dbus_error_init(&error);
-/* avahi_log_debug("dbus: interface=%s, path=%s, member=%s", */
+/* avahi_log_debug(__FILE__": interface=%s, path=%s, member=%s", */
/* dbus_message_get_interface(m), */
/* dbus_message_get_path(m), */
/* dbus_message_get_member(m)); */
if (dbus_message_is_signal(m, DBUS_INTERFACE_LOCAL, "Disconnected")) {
/* No, we shouldn't quit, but until we get somewhere
* usefull such that we can restore our state, we will */
- avahi_log_warn("Disconnnected from d-bus, terminating...");
+ avahi_log_warn("Disconnnected from D-BUS, terminating...");
raise(SIGQUIT); /* The signal handler will catch this and terminate the process cleanly*/
goto fail;
}
-/* avahi_log_info("dbus: name acquired (%s)", name); */
+/* avahi_log_info(__FILE__": name acquired (%s)", name); */
return DBUS_HANDLER_RESULT_HANDLED;
} else if (dbus_message_is_signal(m, DBUS_INTERFACE_DBUS, "NameOwnerChanged")) {
Client *client;
if ((client = client_get(name, FALSE))) {
-/* avahi_log_info("dbus: client %s vanished", name); */
+ avahi_log_debug(__FILE__": client %s vanished.", name);
client_free(client);
}
}
dbus_error_init(&error);
- avahi_log_debug("dbus: interface=%s, path=%s, member=%s",
+ avahi_log_debug(__FILE__": interface=%s, path=%s, member=%s",
dbus_message_get_interface(m),
dbus_message_get_path(m),
dbus_message_get_member(m));
dbus_error_init(&error);
- avahi_log_debug("dbus: interface=%s, path=%s, member=%s",
+ avahi_log_debug(__FILE__": interface=%s, path=%s, member=%s",
dbus_message_get_interface(m),
dbus_message_get_path(m),
dbus_message_get_member(m));
dbus_error_init(&error);
- avahi_log_debug("dbus: interface=%s, path=%s, member=%s",
+ avahi_log_debug(__FILE__": interface=%s, path=%s, member=%s",
dbus_message_get_interface(m),
dbus_message_get_path(m),
dbus_message_get_member(m));
dbus_error_init(&error);
- avahi_log_debug("dbus: interface=%s, path=%s, member=%s",
+ avahi_log_debug(__FILE__": interface=%s, path=%s, member=%s",
dbus_message_get_interface(m),
dbus_message_get_path(m),
dbus_message_get_member(m));
reply = dbus_message_new_signal(i->path, AVAHI_DBUS_INTERFACE_ADDRESS_RESOLVER, "Timeout");
}
+ dbus_message_set_destination(reply, i->client->name);
dbus_connection_send(server->bus, reply, NULL);
dbus_message_unref(reply);
}
dbus_error_init(&error);
- avahi_log_debug("dbus: interface=%s, path=%s, member=%s",
+ avahi_log_debug(__FILE__": interface=%s, path=%s, member=%s",
dbus_message_get_interface(m),
dbus_message_get_path(m),
dbus_message_get_member(m));
reply = dbus_message_new_signal(i->path, AVAHI_DBUS_INTERFACE_HOST_NAME_RESOLVER, "Timeout");
}
+ dbus_message_set_destination(reply, i->client->name);
dbus_connection_send(server->bus, reply, NULL);
dbus_message_unref(reply);
}
dbus_error_init(&error);
- avahi_log_debug("dbus: interface=%s, path=%s, member=%s",
+ avahi_log_debug(__FILE__": interface=%s, path=%s, member=%s",
dbus_message_get_interface(m),
dbus_message_get_path(m),
dbus_message_get_member(m));
DBusMessage *reply;
assert(r);
- assert(host_name);
assert(i);
if (event == AVAHI_RESOLVER_FOUND) {
int32_t i_interface, i_protocol, i_aprotocol;
assert(host_name);
+
+/* avahi_log_debug(__FILE__": [%s] Successfully resolved service <%s.%s.%s>", i->path, name, type, domain); */
assert(a);
avahi_address_snprint(t, sizeof(t), a);
} else {
assert(event == AVAHI_RESOLVER_TIMEOUT);
+/* avahi_log_debug(__FILE__": [%s] Failed to resolve service <%s.%s.%s>", i->path, name, type, domain); */
+
reply = dbus_message_new_signal(i->path, AVAHI_DBUS_INTERFACE_SERVICE_RESOLVER, "Timeout");
}
+ dbus_message_set_destination(reply, i->client->name);
dbus_connection_send(server->bus, reply, NULL);
dbus_message_unref(reply);
}
dbus_error_init(&error);
- avahi_log_debug("dbus: interface=%s, path=%s, member=%s",
+ avahi_log_debug(__FILE__": interface=%s, path=%s, member=%s",
dbus_message_get_interface(m),
dbus_message_get_path(m),
dbus_message_get_member(m));
dbus_error_init(&error);
- avahi_log_debug("dbus: interface=%s, path=%s, member=%s",
+ avahi_log_debug(__FILE__": interface=%s, path=%s, member=%s",
dbus_message_get_interface(m),
dbus_message_get_path(m),
dbus_message_get_member(m));
async_service_resolver_free(i);
return respond_error(c, m, avahi_server_errno(avahi_server), NULL);
}
+
+/* avahi_log_debug(__FILE__": [%s], new service resolver for <%s.%s.%s>", i->path, name, type, domain); */
dbus_connection_register_object_path(c, i->path, &vtable, i);
return respond_path(c, m, i->path);