When add the paired devices to privilege file,
It is not sure that the paired device has been removed
by the remote device and re-piared.
To avoid it, the patch is added.
Change-Id: Ib5969f7dd94958566b176d0ea07a2a8ad3d79177
Signed-off-by: Wu Zheng <wu.zheng@intel.com>
if (isbonding) {
if (paired && pairing_device_address &&
!g_strcmp0(pairing_device_address, address)) {
+ remove_userprivileges(0, address, FALSE);
set_userprivileges(pairing_device_uid,
pairing_device_address);
isbonding = FALSE;
}
} else {
if (paired)
- if (address && relay_agent)
+ if (address && relay_agent) {
+ remove_userprivileges(0, address, FALSE);
set_userprivileges(relay_agent->uid, address);
+ }
}
if (!paired)