diff --git a/src/avahi.c b/src/avahi.c index 6faad263..ae32decc 100644 --- a/src/avahi.c +++ b/src/avahi.c @@ -130,7 +130,7 @@ create_services(AvahiClient *c) if (avahi_entry_group_is_empty(group)) { tvhlog(LOG_DEBUG, "AVAHI", "Adding service '%s'", name); - /* Add the service for IPP */ + /* Add the service for HTSP */ if ((ret = avahi_entry_group_add_service(group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, name, "_htsp._tcp", NULL, NULL, 9982, @@ -145,6 +145,23 @@ create_services(AvahiClient *c) goto fail; } + + /* 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, 9981, + "path=/", + NULL)) < 0) { + + if (ret == AVAHI_ERR_COLLISION) + goto collision; + + tvhlog(LOG_ERR, "AVAHI", + "Failed to add _http._tcp service: %s", + avahi_strerror(ret)); + goto fail; + } + /* Tell the server to register the service */ if ((ret = avahi_entry_group_commit(group)) < 0) { tvhlog(LOG_ERR, "AVAHI",