From 22a61b042376903deada022e7585e0585aaa7d43 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 22 May 2005 02:00:31 +0000 Subject: * Rework some Browsing/Resolving stuff * Add AvahiDomainBrowser * fix avahi_strlist_to_string() with empty lists git-svn-id: file:///home/lennart/svn/public/avahi/trunk@83 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-core/rr.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'avahi-core/rr.c') diff --git a/avahi-core/rr.c b/avahi-core/rr.c index f69d2e2..f3db584 100644 --- a/avahi-core/rr.c +++ b/avahi-core/rr.c @@ -181,6 +181,9 @@ const gchar *avahi_dns_type_to_string(guint16 type) { gchar *avahi_key_to_string(const AvahiKey *k) { + g_assert(k); + g_assert(k->ref >= 1); + return g_strdup_printf("%s\t%s\t%s", k->name, avahi_dns_class_to_string(k->class), @@ -191,6 +194,9 @@ gchar *avahi_record_to_string(const AvahiRecord *r) { gchar *p, *s; char buf[257], *t = NULL, *d = NULL; + g_assert(r); + g_assert(r->ref >= 1); + switch (r->key->type) { case AVAHI_DNS_TYPE_A: inet_ntop(AF_INET, &r->data.a.address.address, t = buf, sizeof(buf)); -- cgit