]> git.meshlink.io Git - catta/blobdiff - avahi-daemon/dbus-async-address-resolver.c
systemd: syslog.target is not longer useful
[catta] / avahi-daemon / dbus-async-address-resolver.c
index 1e714434e484425c94eea92b8526a920c7923694..a77e03c62b0c5faaf633b7ca440821e03119b3dd 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /***
   This file is part of avahi.
 
@@ -46,8 +44,8 @@ void avahi_dbus_async_address_resolver_free(AsyncAddressResolverInfo *i) {
 
     AVAHI_LLIST_REMOVE(AsyncAddressResolverInfo, async_address_resolvers, i->client->async_address_resolvers, i);
 
+    assert(i->client->n_objects >= 1);
     i->client->n_objects--;
-    assert(i->client->n_objects >= 0);
 
     avahi_free(i);
 }
@@ -61,6 +59,11 @@ void avahi_dbus_async_address_resolver_callback(AvahiSAddressResolver *r, AvahiI
 
     reply = dbus_message_new_signal(i->path, AVAHI_DBUS_INTERFACE_ADDRESS_RESOLVER, avahi_dbus_map_resolve_signal_name(event));
 
+    if (!reply) {
+        avahi_log_error("Failed allocate message");
+        return;
+    }
+
     if (event == AVAHI_RESOLVER_FOUND) {
         char t[AVAHI_ADDRESS_STR_MAX], *pt = t;
         int32_t i_interface, i_protocol, i_aprotocol;
@@ -112,7 +115,7 @@ DBusHandlerResult avahi_dbus_msg_async_address_resolver_impl(DBusConnection *c,
 
     /* Introspection */
     if (dbus_message_is_method_call(m, DBUS_INTERFACE_INTROSPECTABLE, "Introspect"))
-        return avahi_dbus_handle_introspect(c, m, "AddressResolver.introspect");
+        return avahi_dbus_handle_introspect(c, m, "org.freedesktop.Avahi.AddressResolver.xml");
 
     /* Access control */
     if (strcmp(dbus_message_get_sender(m), i->client->name))