diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2007-12-09 01:33:54 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2007-12-09 01:33:54 +0000 |
commit | 5e50d37b69baa435fe9f35d0addfe42a011465c1 (patch) | |
tree | 3721f230a42b05194df406805d1dca8b81d61b13 /common | |
parent | a0810667a147a21818ee855b8d9ee737620a4112 (diff) |
Use proper function for checking signal name
Diffstat (limited to 'common')
-rw-r--r-- | common/dbus.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/common/dbus.c b/common/dbus.c index f92ce45f..dd7a34fc 100644 --- a/common/dbus.c +++ b/common/dbus.c @@ -434,17 +434,10 @@ dbus_bool_t dbus_bus_get_unix_process_id(DBusConnection *conn, const char *name, static DBusHandlerResult disconnect_filter(DBusConnection *conn, DBusMessage *msg, void *data) { - const char *iface,*method; struct disconnect_data *dc_data = data; - if (dbus_message_get_type (msg) != DBUS_MESSAGE_TYPE_SIGNAL) - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - - iface = dbus_message_get_interface(msg); - method = dbus_message_get_member(msg); - - if ((strcmp(iface, DBUS_INTERFACE_LOCAL) == 0) && - (strcmp(method, "Disconnected") == 0)) { + if (dbus_message_is_signal(msg, + DBUS_INTERFACE_LOCAL, "Disconnected") == TRUE) { error("Got disconnected from the system message bus"); dbus_connection_unref(conn); dc_data->disconnect_cb(dc_data->user_data); |