X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-daemon%2Fdbus-async-host-name-resolver.c;h=7c2d06318ede0ead77c68adca567eadd3dafa829;hb=7a5b2f69af7d36d6cd4153142f125fa011784e03;hp=4bc9d599d7c356ef54cf3f3c8bf3dd1d88d21cd0;hpb=a97605e07ad7f44f2f65e15be64880e61a39ab43;p=catta diff --git a/avahi-daemon/dbus-async-host-name-resolver.c b/avahi-daemon/dbus-async-host-name-resolver.c index 4bc9d59..7c2d063 100644 --- a/avahi-daemon/dbus-async-host-name-resolver.c +++ b/avahi-daemon/dbus-async-host-name-resolver.c @@ -1,5 +1,3 @@ -/* $Id$ */ - /*** This file is part of avahi. @@ -45,8 +43,8 @@ void avahi_dbus_async_host_name_resolver_free(AsyncHostNameResolverInfo *i) { } AVAHI_LLIST_REMOVE(AsyncHostNameResolverInfo, async_host_name_resolvers, i->client->async_host_name_resolvers, i); + assert(i->client->n_objects >= 1); i->client->n_objects--; - assert(i->client->n_objects >= 0); avahi_free(i); } @@ -60,6 +58,11 @@ void avahi_dbus_async_host_name_resolver_callback(AvahiSHostNameResolver *r, Ava reply = dbus_message_new_signal(i->path, AVAHI_DBUS_INTERFACE_HOST_NAME_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; @@ -110,7 +113,7 @@ DBusHandlerResult avahi_dbus_msg_async_host_name_resolver_impl(DBusConnection *c /* Introspection */ if (dbus_message_is_method_call(m, DBUS_INTERFACE_INTROSPECTABLE, "Introspect")) - return avahi_dbus_handle_introspect(c, m, "HostNameResolver.introspect"); + return avahi_dbus_handle_introspect(c, m, "org.freedesktop.Avahi.HostNameResolver.xml"); /* Access control */ if (strcmp(dbus_message_get_sender(m), i->client->name)) @@ -135,4 +138,3 @@ fail: return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; } -