From: Lukasz Rymanowski <lukasz.rymanowski@tieto.com>
To: linux-bluetooth@vger.kernel.org
Cc: Lukasz Rymanowski <lukasz.rymanowski@tieto.com>
Subject: [PATCH] android/gatt: Fix for read request
Date: Fri, 16 May 2014 12:47:32 +0200 [thread overview]
Message-ID: <1400237252-3968-1-git-send-email-lukasz.rymanowski@tieto.com> (raw)
If there is no attribute in database we should return immediately.
---
android/gatt.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/android/gatt.c b/android/gatt.c
index 9bbcc48..9d90f3a 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -3656,8 +3656,10 @@ static void read_requested_attributes(void *data, void *user_data)
resp_data->offset,
process_data->opcode,
&process_data->device->bdaddr,
- &value, &value_len))
+ &value, &value_len)) {
resp_data->length = READ_FAILED;
+ return;
+ }
/* We have value here already if no callback will be called */
if (value_len >= 0) {
--
1.8.4
next reply other threads:[~2014-05-16 10:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-16 10:47 Lukasz Rymanowski [this message]
2014-05-16 12:36 ` [PATCH] android/gatt: Fix for read request Szymon Janc
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=1400237252-3968-1-git-send-email-lukasz.rymanowski@tieto.com \
--to=lukasz.rymanowski@tieto.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