From 0687ca71bb72a15ced88a511a2df7c2379475194 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 3 Oct 2005 23:37:13 +0000 Subject: [PATCH] ### BACKPORT ### 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 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/avahi-core/browse-domain.c b/avahi-core/browse-domain.c index 6cbc93a..2cb2f75 100644 --- a/avahi-core/browse-domain.c +++ b/avahi-core/browse-domain.c @@ -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); -- 2.39.5