if (i->service_browser)
avahi_s_service_browser_free(i->service_browser);
- dbus_connection_unregister_object_path(server->bus, i->path);
- avahi_free(i->path);
+
+ if (i->path) {
+ dbus_connection_unregister_object_path(server->bus, i->path);
+ avahi_free(i->path);
+ }
+
AVAHI_LLIST_REMOVE(ServiceBrowserInfo, service_browsers, i->client->service_browsers, i);
i->client->n_objects--;
avahi_free(i);
}
-
DBusHandlerResult avahi_dbus_msg_service_browser_impl(DBusConnection *c, DBusMessage *m, void *userdata) {
DBusError error;
ServiceBrowserInfo *i = userdata;
/* Introspection */
if (dbus_message_is_method_call(m, DBUS_INTERFACE_INTROSPECTABLE, "Introspect"))
- return avahi_dbus_handle_introspect(c, m, "ServiceBrowser.Introspect");
+ return avahi_dbus_handle_introspect(c, m, "ServiceBrowser.introspect");
/* Access control */
if (strcmp(dbus_message_get_sender(m), i->client->name))