From b2f4b0332f32ad670765742ef337476e0364801b Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 25 Aug 2007 23:25:19 +0000 Subject: [PATCH] Don't segfault when no browse domains are configured in resolv.conf. Original patch from zml. Closes #162 git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1525 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-daemon/main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/avahi-daemon/main.c b/avahi-daemon/main.c index 7f796ca..42b3221 100644 --- a/avahi-daemon/main.c +++ b/avahi-daemon/main.c @@ -317,6 +317,11 @@ static void update_browse_domains(void) { int n; char **p; + if (!resolv_conf_search_domains) { + avahi_server_set_browse_domains(avahi_server, NULL); + return; + } + l = avahi_string_list_copy(config.server_config.browse_domains); for (p = resolv_conf_search_domains, n = 0; *p && n < BROWSE_DOMAINS_MAX; p++, n++) { -- 2.39.5