All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ 1/4] core/device: Fix btd_device_set_temporary
@ 2015-03-17  9:13 Luiz Augusto von Dentz
  2015-03-17  9:13 ` [PATCH BlueZ 2/4] core/device: Convert temporary flag to bool Luiz Augusto von Dentz
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Luiz Augusto von Dentz @ 2015-03-17  9:13 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

In case the device is set as not temporary it should trigger
store_device_info but the function checks if temporary flag is set but
since currently the code only set the flag after the call nothing really
happens.
---
 src/device.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/device.c b/src/device.c
index 97c0523..6100341 100644
--- a/src/device.c
+++ b/src/device.c
@@ -4474,17 +4474,19 @@ void btd_device_set_temporary(struct btd_device *device, gboolean temporary)
 
 	DBG("temporary %d", temporary);
 
+	device->temporary = temporary;
+
 	if (temporary) {
 		if (device->bredr)
 			adapter_whitelist_remove(device->adapter, device);
 		adapter_connect_list_remove(device->adapter, device);
-	} else {
-		if (device->bredr)
-			adapter_whitelist_add(device->adapter, device);
-		store_device_info(device);
+		return;
 	}
 
-	device->temporary = temporary;
+	if (device->bredr)
+		adapter_whitelist_add(device->adapter, device);
+
+	store_device_info(device);
 }
 
 void btd_device_set_trusted(struct btd_device *device, gboolean trusted)
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-03-17 15:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-17  9:13 [PATCH BlueZ 1/4] core/device: Fix btd_device_set_temporary Luiz Augusto von Dentz
2015-03-17  9:13 ` [PATCH BlueZ 2/4] core/device: Convert temporary flag to bool Luiz Augusto von Dentz
2015-03-17  9:13 ` [PATCH BlueZ 3/4] core/adapter: Remove checks to device_is_temporary Luiz Augusto von Dentz
2015-03-17  9:13 ` [PATCH BlueZ 4/4] core: Make device_set_bonded reset temporary flag Luiz Augusto von Dentz
2015-03-17 15:46 ` [PATCH BlueZ 1/4] core/device: Fix btd_device_set_temporary Luiz Augusto von Dentz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.