All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ] core/service: Fix failing to connect external profile
@ 2015-10-30 13:39 Luiz Augusto von Dentz
  2015-10-31  9:52 ` Steve Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2015-10-30 13:39 UTC (permalink / raw)
  To: linux-bluetooth

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

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 2ed72fb..7da922c 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.4.3


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

* Re: [PATCH BlueZ] core/service: Fix failing to connect external profile
  2015-10-30 13:39 [PATCH BlueZ] core/service: Fix failing to connect external profile Luiz Augusto von Dentz
@ 2015-10-31  9:52 ` Steve Brown
  2015-11-02 14:32   ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 3+ messages in thread
From: Steve Brown @ 2015-10-31  9:52 UTC (permalink / raw)
  To: Luiz Augusto von Dentz, linux-bluetooth

Luiz,

On Fri, 2015-10-30 at 15:39 +0200, Luiz Augusto von Dentz wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> 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 2ed72fb..7da922c 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;
>  	}

This patch solves my hfp headset connect problem.

Thanks,

Steve



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

* Re: [PATCH BlueZ] core/service: Fix failing to connect external profile
  2015-10-31  9:52 ` Steve Brown
@ 2015-11-02 14:32   ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2015-11-02 14:32 UTC (permalink / raw)
  To: Steve Brown; +Cc: linux-bluetooth

Hi,

On Sat, Oct 31, 2015 at 11:52 AM, Steve Brown <sbrown@cortland.com> wrote:
> Luiz,
>
> On Fri, 2015-10-30 at 15:39 +0200, Luiz Augusto von Dentz wrote:
>> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>>
>> 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 2ed72fb..7da922c 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;
>>       }
>
> This patch solves my hfp headset connect problem.
>
> Thanks,
>
> Steve

Applied.


-- 
Luiz Augusto von Dentz

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

end of thread, other threads:[~2015-11-02 14:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-30 13:39 [PATCH BlueZ] core/service: Fix failing to connect external profile Luiz Augusto von Dentz
2015-10-31  9:52 ` Steve Brown
2015-11-02 14:32   ` Luiz Augusto von Dentz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.