* [PATCH BlueZ] AVCTP: Fix scope of transactions to be per channel
@ 2012-10-31 10:04 Luiz Augusto von Dentz
2012-10-31 11:48 ` Johan Hedberg
0 siblings, 1 reply; 2+ messages in thread
From: Luiz Augusto von Dentz @ 2012-10-31 10:04 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
As per AVRCP spec:
"It should be noted that transaction labels are scoped to an AVCTP
channel, so an AVRCP specific AV/C command and an AVRCP specific
browsing command may be outstanding at the same time with the same
transaction label."
---
audio/avctp.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/audio/avctp.c b/audio/avctp.c
index 5f6a677..6ba25e4 100644
--- a/audio/avctp.c
+++ b/audio/avctp.c
@@ -150,6 +150,7 @@ struct avctp_pending_req {
struct avctp_channel {
struct avctp *session;
GIOChannel *io;
+ uint8_t transaction;
guint watch;
uint16_t imtu;
uint16_t omtu;
@@ -1224,17 +1225,16 @@ static struct avctp_pending_req *pending_create(struct avctp_channel *chan,
GDestroyNotify destroy)
{
struct avctp_pending_req *p;
- static uint8_t transaction = 0;
p = g_new0(struct avctp_pending_req, 1);
p->chan = chan;
- p->transaction = transaction;
+ p->transaction = chan->transaction;
p->process = process;
p->data = data;
p->destroy = destroy;
- transaction++;
- transaction %= 16;
+ chan->transaction++;
+ chan->transaction %= 16;
return p;
}
--
1.7.11.7
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-10-31 11:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-31 10:04 [PATCH BlueZ] AVCTP: Fix scope of transactions to be per channel Luiz Augusto von Dentz
2012-10-31 11:48 ` Johan Hedberg
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).