Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH 1/3] android/gatt: Fix reading attribute value
@ 2014-05-16  8:37 Marcin Kraglak
  2014-05-16  8:37 ` [PATCH 2/3] android/gatt: Set length to READ_INIT before read request Marcin Kraglak
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Marcin Kraglak @ 2014-05-16  8:37 UTC (permalink / raw)
  To: linux-bluetooth

If value and length was set by callback while gatt_db_read(), don't set
length to READ_PENDING. We have to set it only for async callbacks, then
length is still READ_INIT.
---
 android/gatt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/android/gatt.c b/android/gatt.c
index b367eef..2a2e649 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -3670,7 +3670,7 @@ static void read_requested_attributes(void *data, void *user_data)
 
 		memcpy(resp_data->value, value, value_len);
 		resp_data->length = value_len;
-	} else {
+	} else if (resp_data->length == READ_INIT) {
 		resp_data->length = READ_PENDING;
 	}
 }
-- 
1.9.0


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

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

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-16  8:37 [PATCH 1/3] android/gatt: Fix reading attribute value Marcin Kraglak
2014-05-16  8:37 ` [PATCH 2/3] android/gatt: Set length to READ_INIT before read request Marcin Kraglak
2014-05-16  8:37 ` [PATCH 3/3] android/gatt: Don't try send responses after process_dev_pending_req() Marcin Kraglak
2014-05-16  8:45 ` [PATCH 1/3] android/gatt: Fix reading attribute value Szymon Janc

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