From: chanyeol.park@samsung.com
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH v3 5/5] audio: Remove redundant procedure when a2dp connect
Date: Tue, 09 Oct 2012 20:35:48 +0900 [thread overview]
Message-ID: <1349782548-27923-5-git-send-email-chanyeol.park@samsung.com> (raw)
In-Reply-To: <1349782548-27923-1-git-send-email-chanyeol.park@samsung.com>
From: Chan-yeol Park <chanyeol.park@samsung.com>
This patch fixes the bug that when remote host is down a2dp connection failure
is handled like XCASE
---
audio/avdtp.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/audio/avdtp.c b/audio/avdtp.c
index d905db3..ae1ab7b 100644
--- a/audio/avdtp.c
+++ b/audio/avdtp.c
@@ -2411,9 +2411,10 @@ static void avdtp_connect_cb(GIOChannel *chan, GError *err, gpointer user_data)
{
struct avdtp *session = user_data;
char address[18];
- GError *gerr = NULL;
+ int err_no = EIO;
if (err) {
+ err_no = err->code;
error("%s", err->message);
goto failed;
}
@@ -2421,13 +2422,13 @@ static void avdtp_connect_cb(GIOChannel *chan, GError *err, gpointer user_data)
if (!session->io)
session->io = g_io_channel_ref(chan);
- bt_io_get(chan, &gerr,
+ bt_io_get(chan, &err,
BT_IO_OPT_OMTU, &session->omtu,
BT_IO_OPT_IMTU, &session->imtu,
BT_IO_OPT_INVALID);
- if (gerr) {
- error("%s", gerr->message);
- g_error_free(gerr);
+ if (err) {
+ err_no = err->code;
+ error("%s", err->message);
goto failed;
}
@@ -2481,7 +2482,7 @@ failed:
avdtp_sep_set_state(session, stream->lsep,
AVDTP_STATE_IDLE);
} else
- connection_lost(session, EIO);
+ connection_lost(session, err_no);
}
static void auth_cb(DBusError *derr, void *user_data)
--
1.7.9.5
next prev parent reply other threads:[~2012-10-09 11:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-09 11:35 [PATCH v3 1/5] audio: Add check for vendor specific A2DP codec chanyeol.park
2012-10-09 11:35 ` [PATCH v3 2/5] avinfo: Replace definitions with a2dp-codecs.h's chanyeol.park
2012-10-09 11:35 ` [PATCH v3 3/5] avinfo: Print a2dp vendor codec info chanyeol.park
2012-10-09 11:35 ` [PATCH v3 4/5] audio: Fix audio driver is not probed chanyeol.park
2012-10-09 11:35 ` chanyeol.park [this message]
2012-10-09 21:33 ` [PATCH v3 1/5] audio: Add check for vendor specific A2DP codec 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=1349782548-27923-5-git-send-email-chanyeol.park@samsung.com \
--to=chanyeol.park@samsung.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