From 6810ad72bf93fb80947fdbd2bdb1529c0afc4135 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 22 Aug 2006 01:43:51 +0000 Subject: [PATCH] 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 --- avahi-daemon/static-services.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)); -- 2.39.5