diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2009-08-06 22:10:19 -0700 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-08-06 22:12:53 -0700 |
commit | f19ee3a6dc8a43188fc19ad614b83979749739cb (patch) | |
tree | 4a65969ff27846e054d7385be4d64c41cff0261a /gdbus/mainloop.c | |
parent | c7c8d2208d3b42bab06d6b6b2c7f0d91b01d1bea (diff) | |
download | bluez-f19ee3a6dc8a43188fc19ad614b83979749739cb.tar.gz |
Fix blocking service watch initial connect handling
Diffstat (limited to 'gdbus/mainloop.c')
-rw-r--r-- | gdbus/mainloop.c | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/gdbus/mainloop.c b/gdbus/mainloop.c index eaba42ea4..a06ed2206 100644 --- a/gdbus/mainloop.c +++ b/gdbus/mainloop.c @@ -281,49 +281,6 @@ gboolean g_dbus_request_name(DBusConnection *connection, const char *name, return TRUE; } -gboolean g_dbus_check_service(DBusConnection *connection, const char *name) -{ - DBusMessage *message, *reply; - const char **names; - int i, count; - gboolean result = FALSE; - - message = dbus_message_new_method_call(DBUS_SERVICE_DBUS, - DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS, "ListNames"); - if (message == NULL) { - error("Can't allocate new message"); - return FALSE; - } - - reply = dbus_connection_send_with_reply_and_block(connection, - message, -1, NULL); - - dbus_message_unref(message); - - if (reply == NULL) { - error("Failed to execute method call"); - return FALSE; - } - - if (dbus_message_get_args(reply, NULL, - DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, - &names, &count, DBUS_TYPE_INVALID) == FALSE) { - error("Failed to read name list"); - goto done; - } - - for (i = 0; i < count; i++) - if (g_str_equal(names[i], name) == TRUE) { - result = TRUE; - break; - } - -done: - dbus_message_unref(reply); - - return result; -} - gboolean g_dbus_set_disconnect_function(DBusConnection *connection, GDBusWatchFunction function, void *user_data, DBusFreeFunction destroy) |