+ if (!(i->service_type_browser = avahi_s_service_type_browser_new(avahi_server, (AvahiIfIndex) interface, (AvahiProtocol) protocol, domain, (AvahiLookupFlags) flags, avahi_dbus_service_type_browser_callback, i))) {
+ avahi_dbus_service_type_browser_free(i);
+ return avahi_dbus_respond_error(c, m, avahi_server_errno(avahi_server), NULL);
+ }
+
+ i->path = avahi_strdup_printf("/Client%u/ServiceTypeBrowser%u", client->id, i->id);
+ dbus_connection_register_object_path(c, i->path, &vtable, i);
+ return avahi_dbus_respond_path(c, m, i->path);
+
+ } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVER, "ServiceBrowserNew")) {
+ Client *client;
+ ServiceBrowserInfo *i;
+ static const DBusObjectPathVTable vtable = {
+ NULL,
+ avahi_dbus_msg_service_browser_impl,
+ NULL,
+ NULL,
+ NULL,
+ NULL
+ };
+ int32_t interface, protocol;
+ uint32_t flags;
+ char *domain, *type;
+
+ if (!dbus_message_get_args(
+ m, &error,
+ DBUS_TYPE_INT32, &interface,
+ DBUS_TYPE_INT32, &protocol,
+ DBUS_TYPE_STRING, &type,
+ DBUS_TYPE_STRING, &domain,
+ DBUS_TYPE_UINT32, &flags,
+ DBUS_TYPE_INVALID) || !type) {
+ avahi_log_warn("Error parsing Server::ServiceBrowserNew message");
+ goto fail;
+ }