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)
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)
if (!domain)
domain = server->domain_name;
- if (!AVAHI_VALID_FLAGS(flags, AVAHI_LOOKUP_USE_WIDE_AREA|AVAHI_LOOKUP_USE_MULTICAST|AVAHI_LOOKUP_NO_TXT|AVAHI_LOOKUP_NO_ADDRESS)) {
+ if (!AVAHI_FLAGS_VALID(flags, AVAHI_LOOKUP_USE_WIDE_AREA|AVAHI_LOOKUP_USE_MULTICAST|AVAHI_LOOKUP_NO_TXT|AVAHI_LOOKUP_NO_ADDRESS)) {
avahi_server_set_errno(server, AVAHI_ERR_INVALID_FLAGS);
return NULL;
}