]> git.meshlink.io Git - catta/commitdiff
fix some issues with host-name/address/service resolving
authorLennart Poettering <lennart@poettering.net>
Mon, 22 Aug 2005 08:56:57 +0000 (08:56 +0000)
committerLennart Poettering <lennart@poettering.net>
Mon, 22 Aug 2005 08:56:57 +0000 (08:56 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@393 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-core/resolve-address.c
avahi-core/resolve-host-name.c
avahi-core/resolve-service.c

index fbf50ffa82900a427a5e4e86f9f91ccc897e7ab0..18c862c1cc9639a987080f40c7cfa756f5700439 100644 (file)
@@ -121,7 +121,7 @@ static void record_browser_callback(AvahiSRecordBrowser*rr, AvahiIfIndex interfa
         
         assert(event == AVAHI_BROWSER_REMOVE);
         
-        if (avahi_record_equal_no_ttl(record, r->ptr_record)) {
+        if (r->ptr_record && avahi_record_equal_no_ttl(record, r->ptr_record)) {
             avahi_record_unref(r->ptr_record);
             r->ptr_record = NULL;
 
index ae7ef783a0db2eefbbd94a9fc9cceb79549082ff..d9c334126bfd48766c06ef2c7736f7cbcd6db5d3 100644 (file)
@@ -141,7 +141,7 @@ static void record_browser_callback(AvahiSRecordBrowser*rr, AvahiIfIndex interfa
 
         assert(event == AVAHI_BROWSER_REMOVE);
 
-        if (avahi_record_equal_no_ttl(record, r->address_record)) {
+        if (r->address_record && avahi_record_equal_no_ttl(record, r->address_record)) {
             avahi_record_unref(r->address_record);
             r->address_record = NULL;
 
index 333f2578ff9b876e21e7cdf028612cf5739adee2..173c34b192f39390ffe4cced34addab740aea77f 100644 (file)
@@ -200,10 +200,11 @@ static void record_browser_callback(AvahiSRecordBrowser*rr, AvahiIfIndex interfa
     } else {
         assert(event == AVAHI_BROWSER_REMOVE);
 
+        
         switch (record->key->type) {
             case AVAHI_DNS_TYPE_SRV:
 
-                if (avahi_record_equal_no_ttl(record, r->srv_record)) {
+                if (r->srv_record && avahi_record_equal_no_ttl(record, r->srv_record)) {
                     avahi_record_unref(r->srv_record);
                     r->srv_record = NULL;
 
@@ -216,7 +217,7 @@ static void record_browser_callback(AvahiSRecordBrowser*rr, AvahiIfIndex interfa
 
             case AVAHI_DNS_TYPE_TXT:
 
-                if (avahi_record_equal_no_ttl(record, r->txt_record)) {
+                if (r->txt_record && avahi_record_equal_no_ttl(record, r->txt_record)) {
                     avahi_record_unref(r->txt_record);
                     r->txt_record = NULL;
 
@@ -229,7 +230,7 @@ static void record_browser_callback(AvahiSRecordBrowser*rr, AvahiIfIndex interfa
             case AVAHI_DNS_TYPE_A:
             case AVAHI_DNS_TYPE_AAAA:
 
-                if (avahi_record_equal_no_ttl(record, r->address_record)) {
+                if (r->address_record && avahi_record_equal_no_ttl(record, r->address_record)) {
                     avahi_record_unref(r->address_record);
                     r->address_record = NULL;