summaryrefslogtreecommitdiff
path: root/packages/avahi/avahi-0.1/resolving.patch
blob: a3d254cf75600e083a7a1fcd40686edb47db0ea6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
diff -Nurd avahi-0.1.orig/avahi-core/resolve-service.c avahi-0.1/avahi-core/resolve-service.c
--- avahi-0.1.orig/avahi-core/resolve-service.c	2005-08-21 23:27:14 +0200
+++ avahi-0.1/avahi-core/resolve-service.c	2005-08-28 00:34:50 +0200
@@ -200,10 +200,11 @@
     } 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 @@
 
             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 @@
             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;
 
diff -Nurd avahi-0.1.orig/avahi-core/resolve-address.c avahi-0.1/avahi-core/resolve-address.c
--- avahi-0.1.orig/avahi-core/resolve-address.c	2005-08-21 23:27:14 +0200
+++ avahi-0.1/avahi-core/resolve-address.c	2005-08-28 00:34:50 +0200
@@ -121,7 +121,7 @@
         
         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;
 
diff -Nurd avahi-0.1.orig/avahi-core/resolve-host-name.c avahi-0.1/avahi-core/resolve-host-name.c
--- avahi-0.1.orig/avahi-core/resolve-host-name.c	2005-08-21 23:27:14 +0200
+++ avahi-0.1/avahi-core/resolve-host-name.c	2005-08-28 00:34:50 +0200
@@ -141,7 +141,7 @@
 
         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;