]> git.meshlink.io Git - catta/commitdiff
### BACKPORT ###
authorLennart Poettering <lennart@poettering.net>
Mon, 3 Oct 2005 23:37:13 +0000 (23:37 +0000)
committerLennart Poettering <lennart@poettering.net>
Mon, 3 Oct 2005 23:37:13 +0000 (23:37 +0000)
Yet another one of those useless-assert bugs:
Actually allow browsing for registration domains

git-svn-id: file:///home/lennart/svn/public/avahi/trunk@691 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-core/browse-domain.c

index 6cbc93a53d31e2645d2a60b34e25d318f89e0370..2cb2f751910c88e4b63e9c697cbd1c10bbcc46e8 100644 (file)
@@ -82,7 +82,11 @@ AvahiSDomainBrowser *avahi_s_domain_browser_new(
     
     assert(server);
     assert(callback);
-    assert(type >= AVAHI_DOMAIN_BROWSER_BROWSE && type <= AVAHI_DOMAIN_BROWSER_BROWSE_LEGACY);
+
+    if (type >= AVAHI_DOMAIN_BROWSER_MAX) {
+        avahi_server_set_errno(server, AVAHI_ERR_INVALID_FLAGS);
+        return NULL;
+    }
 
     if (!AVAHI_IF_VALID(interface)) {
         avahi_server_set_errno(server, AVAHI_ERR_INVALID_INTERFACE);