+ if (!*domain)
+ domain = NULL;
+
+ i = avahi_new(ServiceBrowserInfo, 1);
+ i->id = ++client->current_id;
+ i->client = client;
+ i->path = avahi_strdup_printf("/Client%u/ServiceBrowser%u", client->id, i->id);
+ AVAHI_LLIST_PREPEND(ServiceBrowserInfo, service_browsers, client->service_browsers, i);
+ client->n_objects++;
+
+ if (!(i->service_browser = avahi_s_service_browser_new(avahi_server, (AvahiIfIndex) interface, (AvahiProtocol) protocol, type, domain, (AvahiLookupFlags) flags, avahi_dbus_service_browser_callback, i))) {
+ avahi_dbus_service_browser_free(i);
+ return avahi_dbus_respond_error(c, m, avahi_server_errno(avahi_server), NULL);
+ }
+
+ 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, "ResolveService")) {
+ Client *client;
+ int32_t interface, protocol, aprotocol;
+ uint32_t flags;
+ char *name, *type, *domain;
+ SyncServiceResolverInfo *i;
+
+ if (!dbus_message_get_args(
+ m, &error,
+ DBUS_TYPE_INT32, &interface,
+ DBUS_TYPE_INT32, &protocol,
+ DBUS_TYPE_STRING, &name,
+ DBUS_TYPE_STRING, &type,
+ DBUS_TYPE_STRING, &domain,
+ DBUS_TYPE_INT32, &aprotocol,
+ DBUS_TYPE_UINT32, &flags,
+ DBUS_TYPE_INVALID) || !type) {
+ avahi_log_warn("Error parsing Server::ResolveService message");