summaryrefslogtreecommitdiffstats
path: root/avahi-core/resolve-service.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-09-29 22:34:55 +0000
committerLennart Poettering <lennart@poettering.net>2005-09-29 22:34:55 +0000
commit636b34c81b24edb4787335b02f174b3340af0391 (patch)
treefa2c47f5a6360f9eb9b5a93d19720e896612a949 /avahi-core/resolve-service.c
parentc9f4a5cc86c896529826038741dd588afde3e0ca (diff)
* deal correctly with browsing mDNS services pointing to unicast DNS host names
* fix service resolving for both IPv4 and IPv6 where one of the two addresses doesn't exist git-svn-id: file:///home/lennart/svn/public/avahi/trunk@656 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-core/resolve-service.c')
-rw-r--r--avahi-core/resolve-service.c22
1 files changed, 20 insertions, 2 deletions
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)