Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH] Fix not unmarking temporary flag when a new key is created
@ 2010-08-11 13:49 Luiz Augusto von Dentz
  2010-08-11 13:58 ` Johan Hedberg
  0 siblings, 1 reply; 2+ messages in thread
From: Luiz Augusto von Dentz @ 2010-08-11 13:49 UTC (permalink / raw)
  To: linux-bluetooth

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

Device may have been marked as temporary so when a new key is generated
that meets the requirements to be stored it should unmark temporary flag
so the device is not removed when disconnected.
---
 src/dbus-hci.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/dbus-hci.c b/src/dbus-hci.c
index 22f378d..8c1e10c 100644
--- a/src/dbus-hci.c
+++ b/src/dbus-hci.c
@@ -746,8 +746,7 @@ int hcid_dbus_link_key_notify(bdaddr_t *local, bdaddr_t *peer,
 	else if (!bonding && old_key_type == 0xff)
 		hcid_dbus_bonding_process_complete(local, peer, 0);
 
-	if (temporary)
-		device_set_temporary(device, TRUE);
+	device_set_temporary(device, temporary);
 
 	return 0;
 }
-- 
1.7.0.4


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

* Re: [PATCH] Fix not unmarking temporary flag when a new key is created
  2010-08-11 13:49 [PATCH] Fix not unmarking temporary flag when a new key is created Luiz Augusto von Dentz
@ 2010-08-11 13:58 ` Johan Hedberg
  0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2010-08-11 13:58 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

Hi Luiz,

On Wed, Aug 11, 2010, Luiz Augusto von Dentz wrote:
> Device may have been marked as temporary so when a new key is generated
> that meets the requirements to be stored it should unmark temporary flag
> so the device is not removed when disconnected.
> ---
>  src/dbus-hci.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/src/dbus-hci.c b/src/dbus-hci.c
> index 22f378d..8c1e10c 100644
> --- a/src/dbus-hci.c
> +++ b/src/dbus-hci.c
> @@ -746,8 +746,7 @@ int hcid_dbus_link_key_notify(bdaddr_t *local, bdaddr_t *peer,
>  	else if (!bonding && old_key_type == 0xff)
>  		hcid_dbus_bonding_process_complete(local, peer, 0);
>  
> -	if (temporary)
> -		device_set_temporary(device, TRUE);
> +	device_set_temporary(device, temporary);
>  
>  	return 0;
>  }

Thanks. The patch is now upstream.

Johan

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

end of thread, other threads:[~2010-08-11 13:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-11 13:49 [PATCH] Fix not unmarking temporary flag when a new key is created Luiz Augusto von Dentz
2010-08-11 13:58 ` Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox