From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ] core/service: Fix failing to connect external profile
Date: Fri, 30 Oct 2015 15:39:04 +0200 [thread overview]
Message-ID: <1446212344-10641-1-git-send-email-luiz.dentz@gmail.com> (raw)
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
next reply other threads:[~2015-10-30 13:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-30 13:39 Luiz Augusto von Dentz [this message]
2015-10-31 9:52 ` [PATCH BlueZ] core/service: Fix failing to connect external profile Steve Brown
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=1446212344-10641-1-git-send-email-luiz.dentz@gmail.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/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).