mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2025-01-19 19:03:47 +08:00
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:
parent
ee620aca94
commit
e6b83be22e
@ -347,8 +347,12 @@ gboolean g_dbus_request_name(DBusConnection *connection, const char *name,
|
|||||||
return FALSE;
|
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 FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user