commit | e6b83be22e3c3c12e499ca626a2c97943bdf24b4 | [log] [tgz] |
---|---|---|
author | Vinicius Costa Gomes <vinicius.gomes@openbossa.org> | Mon Feb 01 16:16:22 2010 -0300 |
committer | Marcel Holtmann <marcel@holtmann.org> | Sun Mar 07 14:31:15 2010 -0800 |
tree | 6e779b8916ef3ce8bfe4d1a73189fcec650fa453 | |
parent | ee620aca94abb3af8b18b5f0dfe8f2e8110dcfb2 [diff] |
Fix the case when the requested name is already in use We weren't setting the dbus error in this situation.
diff --git a/gdbus/mainloop.c b/gdbus/mainloop.c index 7f2d001..ec10ab0 100644 --- a/gdbus/mainloop.c +++ b/gdbus/mainloop.c
@@ -347,8 +347,12 @@ 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; }