From 6ada5d5b03acc383ae33e773782d8c725c5df78d Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Fri, 30 Oct 2015 15:27:25 +0200 Subject: [PATCH] core/service: Fix failing to connect external profile When initiating a connection to a external profile btd_service_connect will be called which will change the service state to BTD_SERVICE_STATE_CONNECTING but then once the connection completes service_accept is called but since it now checks the state it would return -EALREADY to prevent driver accept to be called more than once. --- src/service.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/service.c b/src/service.c index 2ed72fbec..7da922cde 100644 --- a/src/service.c +++ b/src/service.c @@ -191,7 +191,7 @@ int service_accept(struct btd_service *service) break; case BTD_SERVICE_STATE_CONNECTING: case BTD_SERVICE_STATE_CONNECTED: - return -EALREADY; + return 0; case BTD_SERVICE_STATE_DISCONNECTING: return -EBUSY; } -- 2.47.3