From: Lennart Poettering Date: Thu, 25 Aug 2005 13:43:14 +0000 (+0000) Subject: * small avahi-discover-standalone beautification when showing empty TXT records X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=fcce6a98913e8e949e3c9f6165080a036e9349cb;p=catta * small avahi-discover-standalone beautification when showing empty TXT records git-svn-id: file:///home/lennart/svn/public/avahi/trunk@441 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- diff --git a/avahi-discover-standalone/main.c b/avahi-discover-standalone/main.c index 1075088..9f70e0d 100644 --- a/avahi-discover-standalone/main.c +++ b/avahi-discover-standalone/main.c @@ -190,7 +190,11 @@ static void update_label(struct Service *s, const gchar *hostname, const AvahiAd char na[256]; avahi_address_snprint(na, sizeof(na), a); snprintf(address, sizeof(address), "%s/%s:%u", hostname, na, port); - txt_s = avahi_string_list_to_string(txt); + + if (txt) + txt_s = avahi_string_list_to_string(txt); + else + txt_s = g_strdup("empty"); } else { snprintf(address, sizeof(address), "n/a"); txt_s = g_strdup("n/a");