File: | build-scan/../src/resolve/resolved-dnssd.c |
Warning: | line 79, column 24 Potential leak of memory pointed to by 'service' |
Press '?' to see keyboard shortcuts
Keyboard shortcuts:
1 | ||||
2 | #include "conf-files.h" | |||
3 | #include "conf-parser.h" | |||
4 | #include "resolved-dnssd.h" | |||
5 | #include "resolved-dns-rr.h" | |||
6 | #include "resolved-manager.h" | |||
7 | #include "specifier.h" | |||
8 | #include "strv.h" | |||
9 | ||||
10 | const char* const dnssd_service_dirs[] = { | |||
11 | "/etc/systemd/dnssd", | |||
12 | "/run/systemd/dnssd", | |||
13 | "/usr/lib/systemd/dnssd", | |||
14 | #ifdef HAVE_SPLIT_USR0 | |||
15 | "/lib/systemd/dnssd", | |||
16 | #endif | |||
17 | NULL((void*)0) | |||
18 | }; | |||
19 | ||||
20 | DnssdTxtData *dnssd_txtdata_free(DnssdTxtData *txt_data) { | |||
21 | if (!txt_data) | |||
22 | return NULL((void*)0); | |||
23 | ||||
24 | dns_resource_record_unref(txt_data->rr); | |||
25 | dns_txt_item_free_all(txt_data->txt); | |||
26 | ||||
27 | return mfree(txt_data); | |||
28 | } | |||
29 | ||||
30 | DnssdTxtData *dnssd_txtdata_free_all(DnssdTxtData *txt_data) { | |||
31 | DnssdTxtData *next; | |||
32 | ||||
33 | if (!txt_data) | |||
34 | return NULL((void*)0); | |||
35 | ||||
36 | next = txt_data->items_next; | |||
37 | ||||
38 | dnssd_txtdata_free(txt_data); | |||
39 | ||||
40 | return dnssd_txtdata_free_all(next); | |||
41 | } | |||
42 | ||||
43 | DnssdService *dnssd_service_free(DnssdService *service) { | |||
44 | if (!service) | |||
45 | return NULL((void*)0); | |||
46 | ||||
47 | if (service->manager) | |||
48 | hashmap_remove(service->manager->dnssd_services, service->name); | |||
49 | ||||
50 | dns_resource_record_unref(service->ptr_rr); | |||
51 | dns_resource_record_unref(service->srv_rr); | |||
52 | ||||
53 | dnssd_txtdata_free_all(service->txt_data_items); | |||
54 | ||||
55 | free(service->filename); | |||
56 | free(service->name); | |||
57 | free(service->type); | |||
58 | free(service->name_template); | |||
59 | ||||
60 | return mfree(service); | |||
61 | } | |||
62 | ||||
63 | static int dnssd_service_load(Manager *manager, const char *filename) { | |||
64 | _cleanup_(dnssd_service_freep)__attribute__((cleanup(dnssd_service_freep))) DnssdService *service = NULL((void*)0); | |||
65 | _cleanup_(dnssd_txtdata_freep)__attribute__((cleanup(dnssd_txtdata_freep))) DnssdTxtData *txt_data = NULL((void*)0); | |||
66 | char *d; | |||
67 | const char *dropin_dirname; | |||
68 | int r; | |||
69 | ||||
70 | assert(manager)do { if ((__builtin_expect(!!(!(manager)),0))) log_assert_failed_realm (LOG_REALM_SYSTEMD, ("manager"), "../src/resolve/resolved-dnssd.c" , 70, __PRETTY_FUNCTION__); } while (0); | |||
71 | assert(filename)do { if ((__builtin_expect(!!(!(filename)),0))) log_assert_failed_realm (LOG_REALM_SYSTEMD, ("filename"), "../src/resolve/resolved-dnssd.c" , 71, __PRETTY_FUNCTION__); } while (0); | |||
72 | ||||
73 | service = new0(DnssdService, 1)((DnssdService*) calloc((1), sizeof(DnssdService))); | |||
74 | if (!service) | |||
75 | return log_oom()log_oom_internal(LOG_REALM_SYSTEMD, "../src/resolve/resolved-dnssd.c" , 75, __func__); | |||
76 | ||||
77 | service->filename = strdup(filename); | |||
78 | if (!service->filename) | |||
79 | return log_oom()log_oom_internal(LOG_REALM_SYSTEMD, "../src/resolve/resolved-dnssd.c" , 79, __func__); | |||
| ||||
80 | ||||
81 | service->name = strdup(basename(filename)); | |||
82 | if (!service->name) | |||
83 | return log_oom()log_oom_internal(LOG_REALM_SYSTEMD, "../src/resolve/resolved-dnssd.c" , 83, __func__); | |||
84 | ||||
85 | d = endswith(service->name, ".dnssd"); | |||
86 | if (!d) | |||
87 | return -EINVAL22; | |||
88 | ||||
89 | assert(streq(d, ".dnssd"))do { if ((__builtin_expect(!!(!((strcmp((d),(".dnssd")) == 0) )),0))) log_assert_failed_realm(LOG_REALM_SYSTEMD, ("streq(d, \".dnssd\")" ), "../src/resolve/resolved-dnssd.c", 89, __PRETTY_FUNCTION__ ); } while (0); | |||
90 | ||||
91 | *d = '\0'; | |||
92 | ||||
93 | dropin_dirname = strjoina(service->name, ".dnssd.d")({ const char *_appendees_[] = { service->name, ".dnssd.d" }; char *_d_, *_p_; size_t _len_ = 0; size_t _i_; for (_i_ = 0; _i_ < __extension__ (__builtin_choose_expr( !__builtin_types_compatible_p (typeof(_appendees_), typeof(&*(_appendees_))), sizeof(_appendees_ )/sizeof((_appendees_)[0]), ((void)0))) && _appendees_ [_i_]; _i_++) _len_ += strlen(_appendees_[_i_]); _p_ = _d_ = __builtin_alloca (_len_ + 1); for (_i_ = 0; _i_ < __extension__ (__builtin_choose_expr ( !__builtin_types_compatible_p(typeof(_appendees_), typeof(& *(_appendees_))), sizeof(_appendees_)/sizeof((_appendees_)[0] ), ((void)0))) && _appendees_[_i_]; _i_++) _p_ = stpcpy (_p_, _appendees_[_i_]); *_p_ = 0; _d_; }); | |||
94 | ||||
95 | r = config_parse_many(filename, dnssd_service_dirs, dropin_dirname, | |||
96 | "Service\0", | |||
97 | config_item_perf_lookup, resolved_dnssd_gperf_lookup, | |||
98 | false0, service); | |||
99 | if (r < 0) | |||
100 | return r; | |||
101 | ||||
102 | if (!service->name_template) { | |||
103 | log_error("%s doesn't define service instance name", service->name)({ int _level = (((3))), _e = ((0)), _realm = (LOG_REALM_SYSTEMD ); (log_get_max_level_realm(_realm) >= ((_level) & 0x07 )) ? log_internal_realm(((_realm) << 10 | (_level)), _e , "../src/resolve/resolved-dnssd.c", 103, __func__, "%s doesn't define service instance name" , service->name) : -abs(_e); }); | |||
104 | return -EINVAL22; | |||
105 | } | |||
106 | ||||
107 | if (!service->type) { | |||
108 | log_error("%s doesn't define service type", service->name)({ int _level = (((3))), _e = ((0)), _realm = (LOG_REALM_SYSTEMD ); (log_get_max_level_realm(_realm) >= ((_level) & 0x07 )) ? log_internal_realm(((_realm) << 10 | (_level)), _e , "../src/resolve/resolved-dnssd.c", 108, __func__, "%s doesn't define service type" , service->name) : -abs(_e); }); | |||
109 | return -EINVAL22; | |||
110 | } | |||
111 | ||||
112 | if (LIST_IS_EMPTY(service->txt_data_items)(!(service->txt_data_items))) { | |||
113 | txt_data = new0(DnssdTxtData, 1)((DnssdTxtData*) calloc((1), sizeof(DnssdTxtData))); | |||
114 | if (!txt_data) | |||
115 | return log_oom()log_oom_internal(LOG_REALM_SYSTEMD, "../src/resolve/resolved-dnssd.c" , 115, __func__); | |||
116 | ||||
117 | r = dns_txt_item_new_empty(&txt_data->txt); | |||
118 | if (r < 0) | |||
119 | return r; | |||
120 | ||||
121 | LIST_PREPEND(items, service->txt_data_items, txt_data)do { typeof(*(service->txt_data_items)) **_head = &(service ->txt_data_items), *_item = (txt_data); do { if ((__builtin_expect (!!(!(_item)),0))) log_assert_failed_realm(LOG_REALM_SYSTEMD, ("_item"), "../src/resolve/resolved-dnssd.c", 121, __PRETTY_FUNCTION__ ); } while (0); if ((_item->items_next = *_head)) _item-> items_next->items_prev = _item; _item->items_prev = ((void *)0); *_head = _item; } while (0); | |||
122 | txt_data = NULL((void*)0); | |||
123 | } | |||
124 | ||||
125 | r = hashmap_ensure_allocated(&manager->dnssd_services, &string_hash_ops)internal_hashmap_ensure_allocated(&manager->dnssd_services , &string_hash_ops ); | |||
126 | if (r < 0) | |||
127 | return r; | |||
128 | ||||
129 | r = hashmap_put(manager->dnssd_services, service->name, service); | |||
130 | if (r < 0) | |||
131 | return r; | |||
132 | ||||
133 | service->manager = manager; | |||
134 | ||||
135 | r = dnssd_update_rrs(service); | |||
136 | if (r < 0) | |||
137 | return r; | |||
138 | ||||
139 | service = NULL((void*)0); | |||
140 | ||||
141 | return 0; | |||
142 | } | |||
143 | ||||
144 | static int specifier_dnssd_host_name(char specifier, void *data, void *userdata, char **ret) { | |||
145 | DnssdService *s = (DnssdService *) userdata; | |||
146 | char *n; | |||
147 | ||||
148 | assert(s)do { if ((__builtin_expect(!!(!(s)),0))) log_assert_failed_realm (LOG_REALM_SYSTEMD, ("s"), "../src/resolve/resolved-dnssd.c", 148, __PRETTY_FUNCTION__); } while (0); | |||
149 | assert(s->manager)do { if ((__builtin_expect(!!(!(s->manager)),0))) log_assert_failed_realm (LOG_REALM_SYSTEMD, ("s->manager"), "../src/resolve/resolved-dnssd.c" , 149, __PRETTY_FUNCTION__); } while (0); | |||
150 | assert(s->manager->llmnr_hostname)do { if ((__builtin_expect(!!(!(s->manager->llmnr_hostname )),0))) log_assert_failed_realm(LOG_REALM_SYSTEMD, ("s->manager->llmnr_hostname" ), "../src/resolve/resolved-dnssd.c", 150, __PRETTY_FUNCTION__ ); } while (0); | |||
151 | ||||
152 | n = strdup(s->manager->llmnr_hostname); | |||
153 | if (!n) | |||
154 | return -ENOMEM12; | |||
155 | ||||
156 | *ret = n; | |||
157 | return 0; | |||
158 | } | |||
159 | ||||
160 | int dnssd_render_instance_name(DnssdService *s, char **ret_name) { | |||
161 | static const Specifier specifier_table[] = { | |||
162 | { 'b', specifier_boot_id, NULL((void*)0) }, | |||
163 | { 'H', specifier_dnssd_host_name, NULL((void*)0) }, | |||
164 | { 'm', specifier_machine_id, NULL((void*)0) }, | |||
165 | { 'v', specifier_kernel_release, NULL((void*)0) }, | |||
166 | {} | |||
167 | }; | |||
168 | _cleanup_free___attribute__((cleanup(freep))) char *name = NULL((void*)0); | |||
169 | int r; | |||
170 | ||||
171 | assert(s)do { if ((__builtin_expect(!!(!(s)),0))) log_assert_failed_realm (LOG_REALM_SYSTEMD, ("s"), "../src/resolve/resolved-dnssd.c", 171, __PRETTY_FUNCTION__); } while (0); | |||
172 | assert(s->name_template)do { if ((__builtin_expect(!!(!(s->name_template)),0))) log_assert_failed_realm (LOG_REALM_SYSTEMD, ("s->name_template"), "../src/resolve/resolved-dnssd.c" , 172, __PRETTY_FUNCTION__); } while (0); | |||
173 | ||||
174 | r = specifier_printf(s->name_template, specifier_table, s, &name); | |||
175 | if (r < 0) | |||
176 | return log_debug_errno(r, "Failed to replace specifiers: %m")({ int _level = ((7)), _e = ((r)), _realm = (LOG_REALM_SYSTEMD ); (log_get_max_level_realm(_realm) >= ((_level) & 0x07 )) ? log_internal_realm(((_realm) << 10 | (_level)), _e , "../src/resolve/resolved-dnssd.c", 176, __func__, "Failed to replace specifiers: %m" ) : -abs(_e); }); | |||
177 | ||||
178 | if (!dns_service_name_is_valid(name)) { | |||
179 | log_debug("Service instance name '%s' is invalid.", name)({ int _level = (((7))), _e = ((0)), _realm = (LOG_REALM_SYSTEMD ); (log_get_max_level_realm(_realm) >= ((_level) & 0x07 )) ? log_internal_realm(((_realm) << 10 | (_level)), _e , "../src/resolve/resolved-dnssd.c", 179, __func__, "Service instance name '%s' is invalid." , name) : -abs(_e); }); | |||
180 | return -EINVAL22; | |||
181 | } | |||
182 | ||||
183 | *ret_name = TAKE_PTR(name)({ typeof(name) _ptr_ = (name); (name) = ((void*)0); _ptr_; } ); | |||
184 | ||||
185 | return 0; | |||
186 | } | |||
187 | ||||
188 | int dnssd_load(Manager *manager) { | |||
189 | _cleanup_strv_free___attribute__((cleanup(strv_freep))) char **files = NULL((void*)0); | |||
190 | char **f; | |||
191 | int r; | |||
192 | ||||
193 | assert(manager)do { if ((__builtin_expect(!!(!(manager)),0))) log_assert_failed_realm (LOG_REALM_SYSTEMD, ("manager"), "../src/resolve/resolved-dnssd.c" , 193, __PRETTY_FUNCTION__); } while (0); | |||
| ||||
194 | ||||
195 | if (manager->mdns_support != RESOLVE_SUPPORT_YES) | |||
196 | return 0; | |||
197 | ||||
198 | r = conf_files_list_strv(&files, ".dnssd", NULL((void*)0), 0, dnssd_service_dirs); | |||
199 | if (r < 0) | |||
200 | return log_error_errno(r, "Failed to enumerate .dnssd files: %m")({ int _level = ((3)), _e = ((r)), _realm = (LOG_REALM_SYSTEMD ); (log_get_max_level_realm(_realm) >= ((_level) & 0x07 )) ? log_internal_realm(((_realm) << 10 | (_level)), _e , "../src/resolve/resolved-dnssd.c", 200, __func__, "Failed to enumerate .dnssd files: %m" ) : -abs(_e); }); | |||
201 | ||||
202 | STRV_FOREACH_BACKWARDS(f, files)for (f = ({ char **_l = files; _l ? _l + strv_length(_l) - 1U : ((void*)0); }); (files) && ((f) >= (files)); (f )--) { | |||
203 | r = dnssd_service_load(manager, *f); | |||
204 | if (r < 0) | |||
205 | log_warning_errno(r, "Failed to load '%s': %m", *f)({ int _level = ((4)), _e = ((r)), _realm = (LOG_REALM_SYSTEMD ); (log_get_max_level_realm(_realm) >= ((_level) & 0x07 )) ? log_internal_realm(((_realm) << 10 | (_level)), _e , "../src/resolve/resolved-dnssd.c", 205, __func__, "Failed to load '%s': %m" , *f) : -abs(_e); });; | |||
206 | } | |||
207 | ||||
208 | return 0; | |||
209 | } | |||
210 | ||||
211 | int dnssd_update_rrs(DnssdService *s) { | |||
212 | _cleanup_free___attribute__((cleanup(freep))) char *n = NULL((void*)0); | |||
213 | _cleanup_free___attribute__((cleanup(freep))) char *service_name = NULL((void*)0); | |||
214 | _cleanup_free___attribute__((cleanup(freep))) char *full_name = NULL((void*)0); | |||
215 | DnssdTxtData *txt_data; | |||
216 | int r; | |||
217 | ||||
218 | assert(s)do { if ((__builtin_expect(!!(!(s)),0))) log_assert_failed_realm (LOG_REALM_SYSTEMD, ("s"), "../src/resolve/resolved-dnssd.c", 218, __PRETTY_FUNCTION__); } while (0); | |||
219 | assert(s->txt_data_items)do { if ((__builtin_expect(!!(!(s->txt_data_items)),0))) log_assert_failed_realm (LOG_REALM_SYSTEMD, ("s->txt_data_items"), "../src/resolve/resolved-dnssd.c" , 219, __PRETTY_FUNCTION__); } while (0); | |||
220 | assert(s->manager)do { if ((__builtin_expect(!!(!(s->manager)),0))) log_assert_failed_realm (LOG_REALM_SYSTEMD, ("s->manager"), "../src/resolve/resolved-dnssd.c" , 220, __PRETTY_FUNCTION__); } while (0); | |||
221 | ||||
222 | s->ptr_rr = dns_resource_record_unref(s->ptr_rr); | |||
223 | s->srv_rr = dns_resource_record_unref(s->srv_rr); | |||
224 | LIST_FOREACH(items, txt_data, s->txt_data_items)for ((txt_data) = (s->txt_data_items); (txt_data); (txt_data ) = (txt_data)->items_next) | |||
225 | txt_data->rr = dns_resource_record_unref(txt_data->rr); | |||
226 | ||||
227 | r = dnssd_render_instance_name(s, &n); | |||
228 | if (r < 0) | |||
229 | return r; | |||
230 | ||||
231 | r = dns_name_concat(s->type, "local", &service_name); | |||
232 | if (r < 0) | |||
233 | return r; | |||
234 | r = dns_name_concat(n, service_name, &full_name); | |||
235 | if (r < 0) | |||
236 | return r; | |||
237 | ||||
238 | LIST_FOREACH(items, txt_data, s->txt_data_items)for ((txt_data) = (s->txt_data_items); (txt_data); (txt_data ) = (txt_data)->items_next) { | |||
239 | txt_data->rr = dns_resource_record_new_full(DNS_CLASS_IN, DNS_TYPE_TXT, | |||
240 | full_name); | |||
241 | if (!txt_data->rr) | |||
242 | goto oom; | |||
243 | ||||
244 | txt_data->rr->ttl = MDNS_DEFAULT_TTL(120); | |||
245 | txt_data->rr->txt.items = dns_txt_item_copy(txt_data->txt); | |||
246 | if (!txt_data->rr->txt.items) | |||
247 | goto oom; | |||
248 | } | |||
249 | ||||
250 | s->ptr_rr = dns_resource_record_new_full(DNS_CLASS_IN, DNS_TYPE_PTR, | |||
251 | service_name); | |||
252 | if (!s->ptr_rr) | |||
253 | goto oom; | |||
254 | ||||
255 | s->ptr_rr->ttl = MDNS_DEFAULT_TTL(120); | |||
256 | s->ptr_rr->ptr.name = strdup(full_name); | |||
257 | if (!s->ptr_rr->ptr.name) | |||
258 | goto oom; | |||
259 | ||||
260 | s->srv_rr = dns_resource_record_new_full(DNS_CLASS_IN, DNS_TYPE_SRV, | |||
261 | full_name); | |||
262 | if (!s->srv_rr) | |||
263 | goto oom; | |||
264 | ||||
265 | s->srv_rr->ttl = MDNS_DEFAULT_TTL(120); | |||
266 | s->srv_rr->srv.priority = s->priority; | |||
267 | s->srv_rr->srv.weight = s->weight; | |||
268 | s->srv_rr->srv.port = s->port; | |||
269 | s->srv_rr->srv.name = strdup(s->manager->mdns_hostname); | |||
270 | if (!s->srv_rr->srv.name) | |||
271 | goto oom; | |||
272 | ||||
273 | return 0; | |||
274 | ||||
275 | oom: | |||
276 | LIST_FOREACH(items, txt_data, s->txt_data_items)for ((txt_data) = (s->txt_data_items); (txt_data); (txt_data ) = (txt_data)->items_next) | |||
277 | txt_data->rr = dns_resource_record_unref(txt_data->rr); | |||
278 | s->ptr_rr = dns_resource_record_unref(s->ptr_rr); | |||
279 | s->srv_rr = dns_resource_record_unref(s->srv_rr); | |||
280 | return -ENOMEM12; | |||
281 | } | |||
282 | ||||
283 | int dnssd_txt_item_new_from_string(const char *key, const char *value, DnsTxtItem **ret_item) { | |||
284 | size_t length; | |||
285 | DnsTxtItem *i; | |||
286 | ||||
287 | length = strlen(key); | |||
288 | ||||
289 | if (!isempty(value)) | |||
290 | length += strlen(value) + 1; /* length of value plus '=' */ | |||
291 | ||||
292 | i = malloc0(offsetof(DnsTxtItem, data) + length + 1)(calloc(1, (__builtin_offsetof(DnsTxtItem, data) + length + 1 ))); /* for safety reasons we add an extra NUL byte */ | |||
293 | if (!i) | |||
294 | return -ENOMEM12; | |||
295 | ||||
296 | memcpy(i->data, key, strlen(key)); | |||
297 | if (!isempty(value)) { | |||
298 | memcpy(i->data + strlen(key), "=", 1); | |||
299 | memcpy(i->data + strlen(key) + 1, value, strlen(value)); | |||
300 | } | |||
301 | i->length = length; | |||
302 | ||||
303 | *ret_item = TAKE_PTR(i)({ typeof(i) _ptr_ = (i); (i) = ((void*)0); _ptr_; }); | |||
304 | ||||
305 | return 0; | |||
306 | } | |||
307 | ||||
308 | int dnssd_txt_item_new_from_data(const char *key, const void *data, const size_t size, DnsTxtItem **ret_item) { | |||
309 | size_t length; | |||
310 | DnsTxtItem *i; | |||
311 | ||||
312 | length = strlen(key); | |||
313 | ||||
314 | if (size > 0) | |||
315 | length += size + 1; /* size of date plus '=' */ | |||
316 | ||||
317 | i = malloc0(offsetof(DnsTxtItem, data) + length + 1)(calloc(1, (__builtin_offsetof(DnsTxtItem, data) + length + 1 ))); /* for safety reasons we add an extra NUL byte */ | |||
318 | if (!i) | |||
319 | return -ENOMEM12; | |||
320 | ||||
321 | memcpy(i->data, key, strlen(key)); | |||
322 | if (size > 0) { | |||
323 | memcpy(i->data + strlen(key), "=", 1); | |||
324 | memcpy(i->data + strlen(key) + 1, data, size); | |||
325 | } | |||
326 | i->length = length; | |||
327 | ||||
328 | *ret_item = TAKE_PTR(i)({ typeof(i) _ptr_ = (i); (i) = ((void*)0); _ptr_; }); | |||
329 | ||||
330 | return 0; | |||
331 | } | |||
332 | ||||
333 | void dnssd_signal_conflict(Manager *manager, const char *name) { | |||
334 | Iterator i; | |||
335 | DnssdService *s; | |||
336 | int r; | |||
337 | ||||
338 | HASHMAP_FOREACH(s, manager->dnssd_services, i)for ((i) = ((Iterator) { .idx = ((2147483647 *2U +1U) - 1), . next_key = ((void*)0) }); hashmap_iterate((manager->dnssd_services ), &(i), (void**)&(s), ((void*)0)); ) { | |||
339 | if (s->withdrawn) | |||
340 | continue; | |||
341 | ||||
342 | if (dns_name_equal(dns_resource_key_name(s->srv_rr->key), name)) { | |||
343 | _cleanup_free___attribute__((cleanup(freep))) char *path = NULL((void*)0); | |||
344 | ||||
345 | s->withdrawn = true1; | |||
346 | ||||
347 | r = sd_bus_path_encode("/org/freedesktop/resolve1/dnssd", s->name, &path); | |||
348 | if (r < 0) { | |||
349 | log_error_errno(r, "Can't get D-BUS object path: %m")({ int _level = ((3)), _e = ((r)), _realm = (LOG_REALM_SYSTEMD ); (log_get_max_level_realm(_realm) >= ((_level) & 0x07 )) ? log_internal_realm(((_realm) << 10 | (_level)), _e , "../src/resolve/resolved-dnssd.c", 349, __func__, "Can't get D-BUS object path: %m" ) : -abs(_e); }); | |||
350 | return; | |||
351 | } | |||
352 | ||||
353 | r = sd_bus_emit_signal(manager->bus, | |||
354 | path, | |||
355 | "org.freedesktop.resolve1.DnssdService", | |||
356 | "Conflicted", | |||
357 | NULL((void*)0)); | |||
358 | if (r < 0) { | |||
359 | log_error_errno(r, "Cannot emit signal: %m")({ int _level = ((3)), _e = ((r)), _realm = (LOG_REALM_SYSTEMD ); (log_get_max_level_realm(_realm) >= ((_level) & 0x07 )) ? log_internal_realm(((_realm) << 10 | (_level)), _e , "../src/resolve/resolved-dnssd.c", 359, __func__, "Cannot emit signal: %m" ) : -abs(_e); }); | |||
360 | return; | |||
361 | } | |||
362 | ||||
363 | break; | |||
364 | } | |||
365 | } | |||
366 | } |