diff options
author | Vinicius Costa Gomes <vinicius.gomes@openbossa.org> | 2010-02-01 16:16:22 -0300 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-03-07 14:31:15 -0800 |
commit | e6b83be22e3c3c12e499ca626a2c97943bdf24b4 (patch) | |
tree | 6e779b8916ef3ce8bfe4d1a73189fcec650fa453 /gdbus/mainloop.c | |
parent | ee620aca94abb3af8b18b5f0dfe8f2e8110dcfb2 (diff) | |
download | bluez-e6b83be22e3c3c12e499ca626a2c97943bdf24b4.tar.gz |
Fix the case when the requested name is already in use
We weren't setting the dbus error in this situation.
Diffstat (limited to 'gdbus/mainloop.c')
-rw-r--r-- | gdbus/mainloop.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gdbus/mainloop.c b/gdbus/mainloop.c index 7f2d001e7..ec10ab069 100644 --- a/gdbus/mainloop.c +++ b/gdbus/mainloop.c @@ -347,8 +347,12 @@ gboolean g_dbus_request_name(DBusConnection *connection, const char *name, return FALSE; } - if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) + if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) { + if (error != NULL) + dbus_set_error(error, name, "Name already in use"); + return FALSE; + } return TRUE; } |