From: Nick Pelly <npelly@google.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH] AVCTP qualification: Handle more error codes.
Date: Fri, 27 Mar 2009 13:25:30 -0700 [thread overview]
Message-ID: <35c90d960903271325w73cc028gd532312afb5ea9c2@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 181 bytes --]
Just these two for today.
We have a stack more null-pointer-check patches, but I need to spend
some time next week with these to see if they are still applicable in
bluez 4.
Nick
[-- Attachment #2: 0002-AVDTP-Qualification-Use-GENERAL_REJECT-instead-of-R.patch --]
[-- Type: application/octet-stream, Size: 1174 bytes --]
From b8b96d9a6b10de01ebbc98bef3543ff46bfeee9b Mon Sep 17 00:00:00 2001
From: Nick Pelly <npelly@google.com>
Date: Fri, 27 Mar 2009 13:03:28 -0700
Subject: [PATCH 2/2] AVDTP Qualification: Use GENERAL_REJECT instead of REJECT for unknown command.
Based on recommendation of BQE.
---
audio/avdtp.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/audio/avdtp.c b/audio/avdtp.c
index ec85426..898e9fe 100644
--- a/audio/avdtp.c
+++ b/audio/avdtp.c
@@ -77,6 +77,7 @@
#define AVDTP_PKT_TYPE_END 0x03
#define AVDTP_MSG_TYPE_COMMAND 0x00
+#define AVDTP_MSG_TYPE_GENERAL_REJECT 0x01
#define AVDTP_MSG_TYPE_ACCEPT 0x02
#define AVDTP_MSG_TYPE_REJECT 0x03
@@ -1117,8 +1118,8 @@ static GSList *caps_to_list(uint8_t *data, int size,
static gboolean avdtp_unknown_cmd(struct avdtp *session, uint8_t transaction,
void *buf, int size)
{
- return avdtp_send(session, transaction, AVDTP_MSG_TYPE_REJECT,
- 0, NULL, 0);
+ return avdtp_send(session, transaction, AVDTP_MSG_TYPE_GENERAL_REJECT,
+ session->in.signal_id, NULL, 0);
}
static gboolean avdtp_discover_cmd(struct avdtp *session, uint8_t transaction,
--
1.6.1.3
reply other threads:[~2009-03-27 20:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=35c90d960903271325w73cc028gd532312afb5ea9c2@mail.gmail.com \
--to=npelly@google.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