X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fmdnsd.git;a=blobdiff_plain;f=ubus.c;h=08b808d5167c7821bdd8e48329e1c294408cfc93;hp=efd6cb106e19ea086fa834d4e4f95741fec61ac6;hb=5e7c65b68ada5a07228ccb83a3b151f633c4725f;hpb=c1c1ab720ed4ffa1e84cc4d201eef260c6cbbb96 diff --git a/ubus.c b/ubus.c index efd6cb1..08b808d 100644 --- a/ubus.c +++ b/ubus.c @@ -20,6 +20,7 @@ #include #include +#include "util.h" #include "ubus.h" #include "cache.h" #include "service.h" @@ -51,10 +52,10 @@ mdns_browse(struct ubus_context *ctx, struct ubus_object *obj, struct blob_attr *msg) { struct cache_entry *s, *q; - char buffer[MAX_NAME_LEN]; + char *buffer = (char *) mdns_buf; void *c1 = NULL, *c2; - blob_buf_init(&b, 0); + blob_buf_init(&b, 0); avl_for_each_element(&entries, s, avl) { char *local; if (*((char *) s->avl.key) != '_') @@ -95,10 +96,10 @@ mdns_hosts(struct ubus_context *ctx, struct ubus_object *obj, struct blob_attr *msg) { struct cache_entry *s; - char buffer[MAX_NAME_LEN]; + char *buffer = (char *) mdns_buf; void *c; - blob_buf_init(&b, 0); + blob_buf_init(&b, 0); avl_for_each_element(&entries, s, avl) { char *local; if (*((char *) s->avl.key) == '_')