linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH BlueZ 1/5] core/service: Fix setting wrong state after calling accept
@ 2016-09-08 12:38 Luiz Augusto von Dentz
  2016-09-08 12:38 ` [PATCH BlueZ 2/5] core/device: Call profile disconnect if ATT disconnects Luiz Augusto von Dentz
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Luiz Augusto von Dentz @ 2016-09-08 12:38 UTC (permalink / raw)
  To: linux-bluetooth

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

The accept calback may transit the state to connected on the call itself
since most of the time it is just a matter of selecting the attributes
in case of GATT profiles.
---
 src/service.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/service.c b/src/service.c
index f387fc4..20a41d0 100644
--- a/src/service.c
+++ b/src/service.c
@@ -209,7 +209,8 @@ int service_accept(struct btd_service *service)
 	return err;
 
 done:
-	change_state(service, BTD_SERVICE_STATE_CONNECTING, 0);
+	if (service->state == BTD_SERVICE_STATE_DISCONNECTED)
+		change_state(service, BTD_SERVICE_STATE_CONNECTING, 0);
 	return 0;
 }
 
-- 
2.7.4


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

end of thread, other threads:[~2016-09-09 14:34 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-08 12:38 [PATCH BlueZ 1/5] core/service: Fix setting wrong state after calling accept Luiz Augusto von Dentz
2016-09-08 12:38 ` [PATCH BlueZ 2/5] core/device: Call profile disconnect if ATT disconnects Luiz Augusto von Dentz
2016-09-08 15:33   ` Felipe Ferreri Tonello
2016-09-09 12:58     ` Luiz Augusto von Dentz
2016-09-08 12:38 ` [PATCH BlueZ 3/5] scanparam: Fix not handling accept properly Luiz Augusto von Dentz
2016-09-08 12:38 ` [PATCH BlueZ 4/5] scanparam: Make use of service user_data to store service context Luiz Augusto von Dentz
2016-09-08 12:39 ` [PATCH BlueZ 5/5] scanparam: Implement disconnect callback Luiz Augusto von Dentz
2016-09-08 14:45 ` [PATCH BlueZ 1/5] core/service: Fix setting wrong state after calling accept Felipe Ferreri Tonello
2016-09-08 15:26   ` Luiz Augusto von Dentz
2016-09-08 15:37     ` Felipe Ferreri Tonello
2016-09-09 12:35       ` Luiz Augusto von Dentz
2016-09-09 14:34         ` Luiz Augusto von Dentz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).