]> git.meshlink.io Git - catta/commitdiff
* small avahi-discover-standalone beautification when showing empty TXT records
authorLennart Poettering <lennart@poettering.net>
Thu, 25 Aug 2005 13:43:14 +0000 (13:43 +0000)
committerLennart Poettering <lennart@poettering.net>
Thu, 25 Aug 2005 13:43:14 +0000 (13:43 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@441 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-discover-standalone/main.c

index 1075088a771ef773efb4b26ffe0b6ecf3e5b811b..9f70e0d07475dcdaef778599bf83bbb0d224233d 100644 (file)
@@ -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("<i>empty</i>");
     } else {
         snprintf(address, sizeof(address), "<i>n/a</i>");
         txt_s = g_strdup("<i>n/a</i>");