core/service: Fix failing to connect external profile
Luiz Augusto von Dentz
maintainerPATCH 1/1 core/service: Fix failing to connect external profile
From: Luiz Augusto von Dentz <[email protected]>
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(-)
src/service.c +1 -1
@@ -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 ; }
Signature · 1 line
2.4.3
Luiz,
Quoted 18 lines · Luiz Augusto von Dentz
From: Luiz Augusto von Dentz <[email protected]>
When initiating a connection to a external profile
btd_service_connect
will be called which will change the service state toBTD_SERVICE_STATE_CONNECTINGbut then once the connection completesservice_acceptis called but since it now checks the state it would return-EALREADYto prevent driver accept to be called more than once.--- src/service.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)src/service.c +0
-0
src/service.c int service_accept(struct btd_service *service) · line 197
Quoted 8 lines
src/service.c +1
-1@@ -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 ; }
This patch solves my hfp headset connect problem.
Thanks,
Steve
Hi,
Quoted 32 lines · Steve Brown
Luiz,
Quoted 18 lines · Luiz Augusto von Dentz
From: Luiz Augusto von Dentz <[email protected]>
When initiating a connection to a external profile
btd_service_connect
will be called which will change the service state toBTD_SERVICE_STATE_CONNECTINGbut then once the connection completesservice_acceptis called but since it now checks the state it would return-EALREADYto prevent driver accept to be called more than once.--- src/service.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)src/service.c +0
-0src/service.c int service_accept(struct btd_service *service) · line 197
Quoted 8 lines
src/service.c +1
-1@@ -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 ; }This patch solves my hfp headset connect problem.
Quoted 3 lines
Thanks,
Steve
Applied.
Signature · 1 line
Luiz Augusto von Dentz