From: Lennart Poettering Date: Tue, 22 Aug 2006 01:43:51 +0000 (+0000) Subject: regenerate wild carded service names when the host name changed X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=6810ad72bf93fb80947fdbd2bdb1529c0afc4135;p=catta regenerate wild carded service names when the host name changed git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1256 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- diff --git a/avahi-daemon/static-services.c b/avahi-daemon/static-services.c index cba22c6..4df6047 100644 --- a/avahi-daemon/static-services.c +++ b/avahi-daemon/static-services.c @@ -222,7 +222,9 @@ static void add_static_service_group_to_server(StaticServiceGroup *g) { /* This service group is already registered in the server */ return; - if (!g->chosen_name) { + if (!g->chosen_name || (g->replace_wildcards && strstr(g->name, "%h"))) { + + avahi_free(g->chosen_name); if (g->replace_wildcards) g->chosen_name = replacestr(g->name, "%h", avahi_server_get_host_name(avahi_server));