From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ 2/3 v3] AVCTP: Fix not destroying browsing channel if disconnected
Date: Sun, 27 Jan 2013 17:52:15 -0600 [thread overview]
Message-ID: <1359330736-9190-2-git-send-email-luiz.dentz@gmail.com> (raw)
In-Reply-To: <1359330736-9190-1-git-send-email-luiz.dentz@gmail.com>
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
If the browsing channel is disconnected it should be destroyed
immediatelly and set to NULL otherwise it will point to invalid channel.
---
profiles/audio/avctp.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/profiles/audio/avctp.c b/profiles/audio/avctp.c
index 6ad2b66..6cac718 100644
--- a/profiles/audio/avctp.c
+++ b/profiles/audio/avctp.c
@@ -485,6 +485,10 @@ static void avctp_set_state(struct avctp *session, avctp_state_t new_state)
break;
case AVCTP_STATE_CONNECTED:
DBG("AVCTP Connected");
+ if (session->browsing) {
+ avctp_channel_destroy(session->browsing);
+ session->browsing = NULL;
+ }
break;
case AVCTP_STATE_BROWSING_CONNECTING:
DBG("AVCTP Browsing Connecting");
--
1.8.1
next prev parent reply other threads:[~2013-01-27 23:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-27 23:52 [PATCH BlueZ 1/3 v3] AVRCP: Fix not handling commands while browsing is connecting Luiz Augusto von Dentz
2013-01-27 23:52 ` Luiz Augusto von Dentz [this message]
2013-01-27 23:52 ` [PATCH BlueZ 3/3 v3] AVCTP: Add destroy callback to avctp_register_browsing_pdu_handler Luiz Augusto von Dentz
2013-01-28 0:00 ` [PATCH BlueZ 1/3 v3] AVRCP: Fix not handling commands while browsing is connecting Johan Hedberg
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=1359330736-9190-2-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).