summaryrefslogtreecommitdiff
path: root/gdbus
diff options
context:
space:
mode:
authorVinicius Costa Gomes <vinicius.gomes@openbossa.org>2010-02-01 16:16:22 -0300
committerMarcel Holtmann <marcel@holtmann.org>2010-03-07 14:32:03 -0800
commita181ec319bf888e6657e1ea1354c3161f9441df7 (patch)
treec3c5805418d8dced6f4d31809202f5c7d9e1eabd /gdbus
parentf721ef55e37a31d2b6272ac28a1445569a4c655d (diff)
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')
-rw-r--r--gdbus/mainloop.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gdbus/mainloop.c b/gdbus/mainloop.c
index 7f2d001e..ec10ab06 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;
}