[PATCH] android/gatt: Fix for read request

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux