From 556d9875a34f02d460ff2c61daaadd6381726ab0 Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Mon, 2 Jun 2014 09:24:20 +0200 Subject: [PATCH] avahi: webroot is not fixed --- src/avahi.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/avahi.c b/src/avahi.c index c84a2f218..d9e512b06 100644 --- a/src/avahi.c +++ b/src/avahi.c @@ -112,6 +112,7 @@ static void create_services(AvahiClient *c) { char *n; + char *path; int ret; assert(c); @@ -147,14 +148,18 @@ create_services(AvahiClient *c) goto fail; } + path = malloc(strlen(tvheadend_webroot) + 6); + sprintf(path, "path=%s", tvheadend_webroot); /* Add the service for HTTP */ if ((ret = avahi_entry_group_add_service(group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, name, "_http._tcp", NULL, NULL, tvheadend_webui_port, - "path=/", + path, NULL)) < 0) { + free(path); + if (ret == AVAHI_ERR_COLLISION) goto collision; -- 2.47.2