linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steve Brown <sbrown@cortland.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
	linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH BlueZ] core/service: Fix failing to connect external profile
Date: Sat, 31 Oct 2015 05:52:38 -0400	[thread overview]
Message-ID: <1446285158.4629.2.camel@cortland.com> (raw)
In-Reply-To: <1446212344-10641-1-git-send-email-luiz.dentz@gmail.com>

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



  reply	other threads:[~2015-10-31  9:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2015-11-02 14:32   ` Luiz Augusto von Dentz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1446285158.4629.2.camel@cortland.com \
    --to=sbrown@cortland.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).