From d1dd07145bb3db5c6fd77c55aea762eb79ab3b5c Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 10 Oct 2005 22:34:06 +0000 Subject: * rename avahi_service_name_snprint() to avahi_service_name_join() * add avahi_service_name_split() and make everything use it * change avahi_normalize_name() to work on a supplied buffer instead of malloc'ed memory. * add avahi_normalize_name_strdup() that retains the old behaviour avahi_normalize_name() * same thing for avahi_get_host_name()/avahi_get_host_name_strdup() * Rewrite domain name escaping and validity checking code * Remove superfluous memory allocationsfrom various browsers and do some other major cleanups * add new global macro AVAHI_CHECK_VALIDITY_RETURN_NULL() and modify many things to make use of it * add AVAHI_LABEL_MAX * patch everything to make use of AVAHI_LABEL_MAX and AVAHI_DOMAIN_NAME_MAX * add pretty printing for NS records * add partial pretty printing for SOA records * add many more validity checks to various user API functions git-svn-id: file:///home/lennart/svn/public/avahi/trunk@708 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-core/server.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'avahi-core/server.h') diff --git a/avahi-core/server.h b/avahi-core/server.h index 1723250..300ae8b 100644 --- a/avahi-core/server.h +++ b/avahi-core/server.h @@ -175,4 +175,11 @@ void avahi_server_increase_host_rr_pending(AvahiServer *s); int avahi_server_set_errno(AvahiServer *s, int error); +#define AVAHI_CHECK_VALIDITY_RETURN_NULL(server, expression, error) { \ + if (!(expression)) { \ + avahi_server_set_errno((server), (error)); \ + return NULL; \ + } \ +} + #endif -- cgit