From: Felix Fietkau Date: Mon, 9 Jun 2014 19:46:25 +0000 (+0200) Subject: move rdata_buffer to cache_answer() X-Git-Url: http://git.openwrt.org/?p=project%2Fmdnsd.git;a=commitdiff_plain;h=65bcc44a706428dee1fb5c66582daab61e887326 move rdata_buffer to cache_answer() Signed-off-by: Felix Fietkau --- diff --git a/cache.c b/cache.c index 4dcccfb..c49b0fd 100644 --- a/cache.c +++ b/cache.c @@ -227,6 +227,8 @@ cache_answer(struct interface *iface, uint8_t *base, int blen, char *name, struc void *rdata_ptr, *txt_ptr; int host_len = 0; + static char rdata_buffer[MAX_DATA_LEN + 1]; + if (!(a->class & CLASS_IN)) return; diff --git a/dns.c b/dns.c index c1c2803..4951774 100644 --- a/dns.c +++ b/dns.c @@ -39,7 +39,6 @@ #include "service.h" #include "interface.h" -char rdata_buffer[MAX_DATA_LEN + 1]; static char name_buffer[MAX_NAME_LEN + 1]; const char* diff --git a/dns.h b/dns.h index 59ba636..ba34a85 100644 --- a/dns.h +++ b/dns.h @@ -68,8 +68,6 @@ struct dns_question { struct interface; -extern char rdata_buffer[MAX_DATA_LEN + 1]; - void dns_send_question(struct interface *iface, const char *question, int type); void dns_init_answer(void); void dns_add_answer(int type, const uint8_t *rdata, uint16_t rdlength);