diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-07-10 04:50:19 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-07-10 04:50:19 +0200 |
commit | 1e001f52d20a4685c9e8cf3cfa690021ca05c9e7 (patch) | |
tree | 670a0da12ff427c044128bf209f42e5ef9143f82 /src/dbus.c | |
parent | 2e22afe909cd5fa003347aa91ad15f0516e5047f (diff) |
main: add a few more useful diagnostic log messages
Diffstat (limited to 'src/dbus.c')
-rw-r--r-- | src/dbus.c | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/src/dbus.c b/src/dbus.c index 1620469e0e..7f8b6a05d5 100644 --- a/src/dbus.c +++ b/src/dbus.c @@ -338,10 +338,12 @@ static DBusHandlerResult api_bus_message_filter(DBusConnection *connection, DBus dbus_error_init(&error); - log_debug("Got D-Bus request: %s.%s() on %s", - dbus_message_get_interface(message), - dbus_message_get_member(message), - dbus_message_get_path(message)); + if (dbus_message_get_type(message) == DBUS_MESSAGE_TYPE_METHOD_CALL || + dbus_message_get_type(message) == DBUS_MESSAGE_TYPE_SIGNAL) + log_debug("Got D-Bus request: %s.%s() on %s", + dbus_message_get_interface(message), + dbus_message_get_member(message), + dbus_message_get_path(message)); if (dbus_message_is_signal(message, DBUS_INTERFACE_LOCAL, "Disconnected")) { log_error("Warning! API D-Bus connection terminated."); @@ -443,10 +445,13 @@ static DBusHandlerResult system_bus_message_filter(DBusConnection *connection, D dbus_error_init(&error); - log_debug("Got D-Bus request: %s.%s() on %s", - dbus_message_get_interface(message), - dbus_message_get_member(message), - dbus_message_get_path(message)); + if (m->api_bus != m->system_bus && + (dbus_message_get_type(message) == DBUS_MESSAGE_TYPE_METHOD_CALL || + dbus_message_get_type(message) == DBUS_MESSAGE_TYPE_SIGNAL)) + log_debug("Got D-Bus request on system bus: %s.%s() on %s", + dbus_message_get_interface(message), + dbus_message_get_member(message), + dbus_message_get_path(message)); if (dbus_message_is_signal(message, DBUS_INTERFACE_LOCAL, "Disconnected")) { log_error("Warning! System D-Bus connection terminated."); @@ -474,10 +479,12 @@ static DBusHandlerResult private_bus_message_filter(DBusConnection *connection, assert(message); assert(m); - log_debug("Got D-Bus request: %s.%s() on %s", - dbus_message_get_interface(message), - dbus_message_get_member(message), - dbus_message_get_path(message)); + if (dbus_message_get_type(message) == DBUS_MESSAGE_TYPE_METHOD_CALL || + dbus_message_get_type(message) == DBUS_MESSAGE_TYPE_SIGNAL) + log_debug("Got D-Bus request: %s.%s() on %s", + dbus_message_get_interface(message), + dbus_message_get_member(message), + dbus_message_get_path(message)); if (dbus_message_is_signal(message, DBUS_INTERFACE_LOCAL, "Disconnected")) shutdown_connection(m, connection); |