make interface_socket_setup static
[project/mdnsd.git] / cache.c
diff --git a/cache.c b/cache.c
index 123925afde4c80831600425004f258066807d483..c49b0fda38033eaf4adaaa900831cdecdc9daede 100644 (file)
--- a/cache.c
+++ b/cache.c
@@ -116,10 +116,12 @@ void cache_cleanup(void)
 void
 cache_scan(void)
 {
+       struct interface *iface;
        struct cache_entry *s;
 
-       avl_for_each_element(&entries, s, avl)
-               dns_send_question(cur_iface, s->entry, TYPE_PTR);
+       vlist_for_each_element(&interfaces, iface, node)
+               avl_for_each_element(&entries, s, avl)
+                       dns_send_question(iface, s->entry, TYPE_PTR);
 }
 
 static struct cache_entry*
@@ -225,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;