diff options
author | Lennart Poettering <lennart@poettering.net> | 2005-11-23 22:28:15 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2005-11-23 22:28:15 +0000 |
commit | f6a388c0b603fa1913da7a5db4737e2c162f9547 (patch) | |
tree | 0123ef744afabbac82f2ce157ea9122d43f6656c /avahi-core/browse-domain.c | |
parent | 69d2b9fee695cf2e65f1eda9c8ce66085efe2856 (diff) | |
download | avahi-f6a388c0b603fa1913da7a5db4737e2c162f9547.tar.gz |
in the domain browser objects: don't return statically configured browsing domains when the user asked for registration domains
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1022 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-core/browse-domain.c')
-rw-r--r-- | avahi-core/browse-domain.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/avahi-core/browse-domain.c b/avahi-core/browse-domain.c index 4c78832..9b2beb0 100644 --- a/avahi-core/browse-domain.c +++ b/avahi-core/browse-domain.c @@ -106,6 +106,8 @@ static void defer_callback(AvahiTimeEvent *e, void *userdata) { assert(e); assert(b); + assert(b->type == AVAHI_DOMAIN_BROWSER_BROWSE); + avahi_time_event_free(b->defer_event); b->defer_event = NULL; @@ -113,12 +115,12 @@ static void defer_callback(AvahiTimeEvent *e, void *userdata) { inc_ref(b); for (l = b->server->config.browse_domains; l; l = l->next) { - + /* Check whether this object still exists outside our own * stack frame */ if (b->ref <= 1) break; - + b->callback(b, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, AVAHI_BROWSER_NEW, (char*) l->text, AVAHI_LOOKUP_RESULT_STATIC, b->userdata); } @@ -198,7 +200,8 @@ AvahiSDomainBrowser *avahi_s_domain_browser_new( avahi_key_unref(k); - b->defer_event = avahi_time_event_new(server->time_event_queue, NULL, defer_callback, b); + if (type == AVAHI_DOMAIN_BROWSER_BROWSE && b->server->config.browse_domains) + b->defer_event = avahi_time_event_new(server->time_event_queue, NULL, defer_callback, b); return b; |