Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ] gatt: Fix checking for paired flag instead of bonded
@ 2018-03-27 15:38 Luiz Augusto von Dentz
  2018-03-28  6:44 ` Szymon Janc
  0 siblings, 1 reply; 2+ messages in thread
From: Luiz Augusto von Dentz @ 2018-03-27 15:38 UTC (permalink / raw)
  To: linux-bluetooth

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

Device state should remain valid for devices that are bonded/stored not
only paired.
---
 src/gatt-database.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gatt-database.c b/src/gatt-database.c
index 2c2526f74..5e2390b34 100644
--- a/src/gatt-database.c
+++ b/src/gatt-database.c
@@ -324,7 +324,7 @@ static void att_disconnected(int err, void *user_data)
 	if (!device)
 		goto remove;
 
-	if (device_is_paired(device, state->bdaddr_type))
+	if (device_is_bonded(device, state->bdaddr_type))
 		return;
 
 remove:
@@ -1125,7 +1125,7 @@ static void send_notification_to_device(void *data, void *user_data)
 
 	server = btd_device_get_gatt_server(device);
 	if (!server) {
-		if (!device_is_paired(device, device_state->bdaddr_type))
+		if (!device_is_bonded(device, device_state->bdaddr_type))
 			goto remove;
 		state_set_pending(device_state, notify);
 		return;
-- 
2.14.3


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

* Re: [PATCH BlueZ] gatt: Fix checking for paired flag instead of bonded
  2018-03-27 15:38 [PATCH BlueZ] gatt: Fix checking for paired flag instead of bonded Luiz Augusto von Dentz
@ 2018-03-28  6:44 ` Szymon Janc
  0 siblings, 0 replies; 2+ messages in thread
From: Szymon Janc @ 2018-03-28  6:44 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

Hi Luiz,

On Tuesday, 27 March 2018 17:38:20 CEST Luiz Augusto von Dentz wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> Device state should remain valid for devices that are bonded/stored not
> only paired.
> ---
>  src/gatt-database.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/gatt-database.c b/src/gatt-database.c
> index 2c2526f74..5e2390b34 100644
> --- a/src/gatt-database.c
> +++ b/src/gatt-database.c
> @@ -324,7 +324,7 @@ static void att_disconnected(int err, void *user_data)
>  	if (!device)
>  		goto remove;
> 
> -	if (device_is_paired(device, state->bdaddr_type))
> +	if (device_is_bonded(device, state->bdaddr_type))
>  		return;
> 
>  remove:
> @@ -1125,7 +1125,7 @@ static void send_notification_to_device(void *data,
> void *user_data)
> 
>  	server = btd_device_get_gatt_server(device);
>  	if (!server) {
> -		if (!device_is_paired(device, device_state->bdaddr_type))
> +		if (!device_is_bonded(device, device_state->bdaddr_type))
>  			goto remove;
>  		state_set_pending(device_state, notify);
>  		return;

Applied, thanks.

-- 
pozdrawiam
Szymon Janc



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

end of thread, other threads:[~2018-03-28  6:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-27 15:38 [PATCH BlueZ] gatt: Fix checking for paired flag instead of bonded Luiz Augusto von Dentz
2018-03-28  6:44 ` Szymon Janc

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