summaryrefslogtreecommitdiffstats
path: root/avahi-core/server.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-11-03 23:36:25 +0000
committerLennart Poettering <lennart@poettering.net>2005-11-03 23:36:25 +0000
commite2f7e83d25a5f0966938163c18b1fd8c399393b1 (patch)
treed1b81ea5fc73aac20078cb2634bbff316e17cd6a /avahi-core/server.c
parent00ea7c8f503fd9d1c1c62db837e8f4fb60443117 (diff)
* allow the user to specify a static browse domain list in the configuration file
* remove "drop-root" configuration variable * move the configuration variable "add-service-cookie" from [server] to [publish] * reorder AVAHI_DOMAIN_BROWSER_xx defs git-svn-id: file:///home/lennart/svn/public/avahi/trunk@926 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-core/server.c')
-rw-r--r--avahi-core/server.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/avahi-core/server.c b/avahi-core/server.c
index 3d53154..d92afac 100644
--- a/avahi-core/server.c
+++ b/avahi-core/server.c
@@ -1528,6 +1528,7 @@ AvahiServerConfig* avahi_server_config_init(AvahiServerConfig *c) {
c->enable_wide_area = 0;
c->n_wide_area_servers = 0;
c->disallow_other_stacks = 0;
+ c->browse_domains = NULL;
return c;
}
@@ -1537,10 +1538,12 @@ void avahi_server_config_free(AvahiServerConfig *c) {
avahi_free(c->host_name);
avahi_free(c->domain_name);
+ avahi_string_list_free(c->browse_domains);
}
AvahiServerConfig* avahi_server_config_copy(AvahiServerConfig *ret, const AvahiServerConfig *c) {
char *d = NULL, *h = NULL;
+ AvahiStringList *l = NULL;
assert(ret);
assert(c);
@@ -1553,10 +1556,17 @@ AvahiServerConfig* avahi_server_config_copy(AvahiServerConfig *ret, const AvahiS
avahi_free(h);
return NULL;
}
+
+ if (!(l = avahi_string_list_copy(c->browse_domains)) && c->browse_domains) {
+ avahi_free(h);
+ avahi_free(d);
+ return NULL;
+ }
*ret = *c;
ret->host_name = h;
ret->domain_name = d;
+ ret->browse_domains = l;
return ret;
}