projects
/
project
/
mdnsd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
move announce state to struct interface
[project/mdnsd.git]
/
ubus.c
diff --git
a/ubus.c
b/ubus.c
index
c474bb5
..
1009a3a
100644
(file)
--- a/
ubus.c
+++ b/
ubus.c
@@
-22,6
+22,7
@@
#include "ubus.h"
#include "cache.h"
#include "ubus.h"
#include "cache.h"
+#include "service.h"
static struct ubus_auto_conn conn;
static struct blob_buf b;
static struct ubus_auto_conn conn;
static struct blob_buf b;
@@
-31,6
+32,7
@@
mdns_reload(struct ubus_context *ctx, struct ubus_object *obj,
struct ubus_request_data *req, const char *method,
struct blob_attr *msg)
{
struct ubus_request_data *req, const char *method,
struct blob_attr *msg)
{
+ service_init();
return 0;
}
return 0;
}
@@
-44,10
+46,10
@@
mdns_scan(struct ubus_context *ctx, struct ubus_object *obj,
}
static void
}
static void
-mdns_add_records(char *name)
+mdns_add_records(c
onst c
har *name)
{
struct cache_record *r, *q = avl_find_element(&records, name, r, avl);
{
struct cache_record *r, *q = avl_find_element(&records, name, r, avl);
- char *txt;
+ c
onst c
har *txt;
char buffer[MAX_NAME_LEN];
if (!q)
char buffer[MAX_NAME_LEN];
if (!q)
@@
-107,10
+109,7
@@
mdns_browse(struct ubus_context *ctx, struct ubus_object *obj,
continue;
if (!c1) {
continue;
if (!c1) {
- char *type = cache_lookup_name(buffer);
c1 = blobmsg_open_table(&b, 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, "._");
}
snprintf(buffer, MAX_NAME_LEN, s->entry);
local = strstr(buffer, "._");