From e865e3dba3c6ee5de5581dbfbafc025aa5c9947e Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 23 Oct 2005 20:21:39 +0000 Subject: * correctly handle empty domain names (i.e. the root zone) * fix memory initialization error in wide-area.c * make server_add_xx() functions atomic, i.e. clean up half-created entries on failure * add some more validity checking macros and change everything to make use of them * clean up avahi_server_add_address() * change some functions from domain.[ch] to work on a stack buffer instead of malloced memory * update avahi-test.c a little * replace avahi_reverse_lookup_name_{ipv4,ipv6}() with a single function avahi_reverse_lookup_name() * remove avahi_server_add_dns_server_name() from public API git-svn-id: file:///home/lennart/svn/public/avahi/trunk@845 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-common/domain-test.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'avahi-common/domain-test.c') diff --git a/avahi-common/domain-test.c b/avahi-common/domain-test.c index f1313cb..279be72 100644 --- a/avahi-common/domain-test.c +++ b/avahi-common/domain-test.c @@ -110,5 +110,12 @@ int main(int argc, char *argv[]) { assert(avahi_is_valid_host_name("sfooo.")); assert(avahi_is_valid_host_name("sfooo")); + assert(avahi_is_valid_domain_name(".")); + assert(avahi_is_valid_domain_name("")); + + assert(avahi_normalize_name(".", t, sizeof(t))); + assert(avahi_normalize_name("", t, sizeof(t))); + + return 0; } -- cgit