#include "ubus.h"
#include "cache.h"
+#include "service.h"
static struct ubus_auto_conn conn;
static struct blob_buf b;
struct ubus_request_data *req, const char *method,
struct blob_attr *msg)
{
+ service_init();
return 0;
}
}
static void
-mdns_add_records(char *name)
+mdns_add_records(const char *name)
{
struct cache_record *r, *q = avl_find_element(&records, name, r, avl);
- char *txt;
+ const char *txt;
char buffer[MAX_NAME_LEN];
if (!q)
continue;
if (!c1) {
- char *type = cache_lookup_name(buffer);
c1 = blobmsg_open_table(&b, buffer);
- if (type)
- blobmsg_add_string(&b, ".desc", type);
}
snprintf(buffer, MAX_NAME_LEN, s->entry);
local = strstr(buffer, "._");