diff options
author | Jakub Tyszkowski <jakub.tyszkowski@tieto.com> | 2014-05-28 11:17:59 +0200 |
---|---|---|
committer | Szymon Janc <szymon.janc@tieto.com> | 2014-05-28 11:25:56 +0200 |
commit | d4ea8f329982d6b450c202c5dcb01fd461362a16 (patch) | |
tree | 89000613bbe98ea19fa565b5c1959b7d64c10967 | |
parent | a02d0cbff5d35318e65d587dae77c115d265202e (diff) | |
download | bluez-d4ea8f329982d6b450c202c5dcb01fd461362a16.tar.gz |
android/gatt: Fix not checking for read errors in read by type
-rw-r--r-- | android/gatt.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/android/gatt.c b/android/gatt.c index 9234b467e..6189407f9 100644 --- a/android/gatt.c +++ b/android/gatt.c @@ -3643,9 +3643,15 @@ static void send_dev_pending_response(struct gatt_device *device, goto done; } + if (val->error) { + queue_destroy(temp, NULL); + error = val->error; + goto done; + } + length = val->length; - while (val && val->length == length) { + while (val && val->length == length && val->error == 0) { queue_push_tail(temp, val); val = queue_pop_head(device->pending_requests); } |