Fix the case when the requested name is already in use

We weren't setting the dbus error in this situation.
This commit is contained in:
Vinicius Costa Gomes 2010-02-01 16:16:22 -03:00 committed by Marcel Holtmann
parent f721ef55e3
commit a181ec319b
1 changed files with 5 additions and 1 deletions

View File

@ -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;
}