summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-08-25 13:43:14 +0000
committerLennart Poettering <lennart@poettering.net>2005-08-25 13:43:14 +0000
commitfcce6a98913e8e949e3c9f6165080a036e9349cb (patch)
tree96b90495719429dafa7ec199fb88b79c36e9c9de
parentd2becd6d10f5f888127a6bf83949fb105522f1e6 (diff)
* 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
-rw-r--r--avahi-discover-standalone/main.c6
1 files changed, 5 insertions, 1 deletions
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("<i>empty</i>");
} else {
snprintf(address, sizeof(address), "<i>n/a</i>");
txt_s = g_strdup("<i>n/a</i>");