Re: [Bluez PATCH v1] shared/gatt-client: Fix GATT client attribute read with offset

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

 



Hi Howard,

On Mon, Jun 28, 2021 at 4:57 AM Yun-hao Chung <howardchung@xxxxxxxxxx> wrote:
>
> Hi,
>
> Can we get a reply on this patch?
>
> Thanks,
> Howard
>
> On Mon, Dec 28, 2020 at 2:22 PM Howard Chung <howardchung@xxxxxxxxxx> wrote:
>>
>> bluez always replies the whole value despite a user specify the offset.
>> This patch fixes the issue.
>>
>> Reviewed-by: sonnysasaka@xxxxxxxxxxxx
>> ---
>>
>>  src/gatt-client.c | 6 ++++--
>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/gatt-client.c b/src/gatt-client.c
>> index 0cf5324ffa46..bec6e1ec049e 100644
>> --- a/src/gatt-client.c
>> +++ b/src/gatt-client.c
>> @@ -368,7 +368,8 @@ static void desc_read_cb(bool success, uint8_t att_ecode,
>>         }
>>
>>         /* Read the stored data from db */
>> -       if (!gatt_db_attribute_read(desc->attr, 0, 0, NULL, read_op_cb, op)) {
>> +       if (!gatt_db_attribute_read(desc->attr, op->offset, 0, NULL, read_op_cb,
>> +                                                                       op)) {
>>                 error("Failed to read database");
>>                 att_ecode = BT_ATT_ERROR_UNLIKELY;
>>                 goto fail;
>> @@ -906,7 +907,8 @@ static void chrc_read_cb(bool success, uint8_t att_ecode, const uint8_t *value,
>>         }
>>
>>         /* Read the stored data from db */
>> -       if (!gatt_db_attribute_read(chrc->attr, 0, 0, NULL, read_op_cb, op)) {
>> +       if (!gatt_db_attribute_read(chrc->attr, op->offset, 0, NULL, read_op_cb,
>> +                                                                       op)) {
>>                 error("Failed to read database");
>>                 att_ecode = BT_ATT_ERROR_UNLIKELY;
>>                 goto fail;
>> --
>> 2.29.2.729.g45daf8777d-goog

Applied, thanks.

-- 
Luiz Augusto von Dentz



[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