summaryrefslogtreecommitdiff
blob: 84b8b1dae1e080330e6ae20579e3f99e02c7a112 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Index: trunk/avahi-compat-libdns_sd/compat.c
===================================================================
--- trunk/avahi-compat-libdns_sd/compat.c	(revision 1535)
+++ trunk/avahi-compat-libdns_sd/compat.c	(revision 1536)
@@ -990,6 +990,16 @@
                     return;
                 }
             }
+
+            if (!sdref->service_name_chosen) {
+
+                assert(sdref->service_name);
+                
+                if (!(sdref->service_name_chosen = avahi_strdup(sdref->service_name))) {
+                    reg_report_error(sdref, kDNSServiceErr_NoMemory);
+                    return;
+                }
+            }
             
             /* Register the service */