[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-bluetooth
Subject: [PATCH 2/2] android/gatt: Fix not setting request as done on direct db read
From: Jakub Tyszkowski <jakub.tyszkowski () tieto ! com>
Date: 2014-05-30 13:19:42
Message-ID: 1401455982-31339-2-git-send-email-jakub.tyszkowski () tieto ! com
[Download RAW message or body]
Previously if read was succesfull - request was not marked as completed
because no callback was called for direct db read.
---
android/gatt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/android/gatt.c b/android/gatt.c
index a61d702..46dc7f6 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -4086,10 +4086,11 @@ static void read_requested_attributes(void *data, void *user_data)
/* We have value here already if no callback will be called */
if (value_len >= 0) {
+ resp_data->state = REQUEST_DONE;
+
resp_data->value = malloc0(value_len);
if (!resp_data->value) {
/* If data cannot be copied, act like when read fails */
- resp_data->state = REQUEST_DONE;
resp_data->error = ATT_ECODE_INSUFF_RESOURCES;
return;
}
--
1.9.3
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic