[PATCH] Fix remove device alias when bonding deleted

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Device alias is removed together with bonding information, such that
new pairing does not reuse old name. This is useful in cases when
name of paired device was changed after it was ones deleted.
---
 src/device.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/device.c b/src/device.c
index 4ffc124..47d1c05 100644
--- a/src/device.c
+++ b/src/device.c
@@ -965,6 +965,11 @@ void device_remove_bonding(struct btd_device *device)
 	/* Delete the link key from storage */
 	textfile_casedel(filename, dstaddr);
 
+	create_name(filename, PATH_MAX, STORAGEDIR, srcaddr,
+						"aliases");
+	/* Remove alias when bonding is deleted */
+	textfile_casedel(filename, dstaddr);
+
 	btd_adapter_remove_bonding(device->adapter, &device->bdaddr);
 }
 
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux