Permissions check was failing on those requests.
---
android/gatt.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/android/gatt.c b/android/gatt.c
index fcc91ff..a61d702 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -4007,6 +4007,8 @@ static uint8_t check_device_permissions(struct gatt_device *device,
case ATT_OP_READ_BLOB_REQ:
case ATT_OP_READ_MULTI_REQ:
case ATT_OP_READ_BY_GROUP_REQ:
+ case ATT_OP_FIND_BY_TYPE_REQ:
+ case ATT_OP_FIND_INFO_REQ:
if (!(permissions & GATT_PERM_READ))
return ATT_ECODE_READ_NOT_PERM;
--
1.9.3
Hi Jakub,
On Friday 30 of May 2014 15:19:41 Jakub Tyszkowski wrote:
> Permissions check was failing on those requests.
> ---
> android/gatt.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/android/gatt.c b/android/gatt.c
> index fcc91ff..a61d702 100644
> --- a/android/gatt.c
> +++ b/android/gatt.c
> @@ -4007,6 +4007,8 @@ static uint8_t check_device_permissions(struct
> gatt_device *device, case ATT_OP_READ_BLOB_REQ:
> case ATT_OP_READ_MULTI_REQ:
> case ATT_OP_READ_BY_GROUP_REQ:
> + case ATT_OP_FIND_BY_TYPE_REQ:
> + case ATT_OP_FIND_INFO_REQ:
> if (!(permissions & GATT_PERM_READ))
> return ATT_ECODE_READ_NOT_PERM;
Both patches applied, thanks.
--
BR
Szymon Janc
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