Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH] android/gatt: Fix for read request
@ 2014-05-16 10:47 Lukasz Rymanowski
  2014-05-16 12:36 ` Szymon Janc
  0 siblings, 1 reply; 2+ messages in thread
From: Lukasz Rymanowski @ 2014-05-16 10:47 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Lukasz Rymanowski

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-05-16 12:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-16 10:47 [PATCH] android/gatt: Fix for read request Lukasz Rymanowski
2014-05-16 12:36 ` Szymon Janc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox