X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-core%2Fresolve-service.c;h=4a3cec8e8149fb9a3a9e831117d1c0690a478e9f;hb=c4cbc73a5fdc59d90b5d3c8dadaff8f228b98671;hp=1d79c5a0fe2a4dbacfed9075e875f084f988b651;hpb=424aefe8a431b79496672799dc4f4430fa935252;p=catta diff --git a/avahi-core/resolve-service.c b/avahi-core/resolve-service.c index 1d79c5a..4a3cec8 100644 --- a/avahi-core/resolve-service.c +++ b/avahi-core/resolve-service.c @@ -195,10 +195,10 @@ static void record_browser_callback( int changed = 0; assert(record); - if (r->interface > 0 && interface != r->interface) + if (r->interface > 0 && interface > 0 && interface != r->interface) return; - if (r->protocol != AVAHI_PROTO_UNSPEC && protocol != r->protocol) + if (r->protocol != AVAHI_PROTO_UNSPEC && protocol != AVAHI_PROTO_UNSPEC && protocol != r->protocol) return; if (r->interface <= 0) @@ -349,6 +349,24 @@ static void record_browser_callback( case AVAHI_BROWSER_NOT_FOUND: case AVAHI_BROWSER_FAILURE: + + if (rr == r->record_browser_a && r->record_browser_aaaa) { + /* We were looking for both AAAA and A, and the other query is still living, so we'll not die */ + avahi_s_record_browser_free(r->record_browser_a); + r->record_browser_a = NULL; + break; + } + + if (rr == r->record_browser_aaaa && r->record_browser_a) { + /* We were looking for both AAAA and A, and the other query is still living, so we'll not die */ + avahi_s_record_browser_free(r->record_browser_aaaa); + r->record_browser_aaaa = NULL; + break; + } + + + /* Hmm, everything's lost, tell the user */ + if (r->record_browser_srv) avahi_s_record_browser_free(r->record_browser_srv); if (r->record_browser_txt)