* [Bluez PATCH v1] shared/gatt-client: Fix GATT client attribute read with offset
@ 2020-12-28 6:22 Howard Chung
2020-12-28 6:44 ` [Bluez,v1] " bluez.test.bot
[not found] ` <CAPHZWUcgjK+NSTj_GozH8jv5AHOfEOxu7mM95VgCq0Zr02Dyhg@mail.gmail.com>
0 siblings, 2 replies; 3+ messages in thread
From: Howard Chung @ 2020-12-28 6:22 UTC (permalink / raw)
To: linux-bluetooth, luiz.dentz; +Cc: sonnysasaka, alainm, Howard Chung
bluez always replies the whole value despite a user specify the offset.
This patch fixes the issue.
Reviewed-by: sonnysasaka@chromium.org
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [Bluez,v1] shared/gatt-client: Fix GATT client attribute read with offset
2020-12-28 6:22 [Bluez PATCH v1] shared/gatt-client: Fix GATT client attribute read with offset Howard Chung
@ 2020-12-28 6:44 ` bluez.test.bot
[not found] ` <CAPHZWUcgjK+NSTj_GozH8jv5AHOfEOxu7mM95VgCq0Zr02Dyhg@mail.gmail.com>
1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2020-12-28 6:44 UTC (permalink / raw)
To: linux-bluetooth, howardchung
[-- Attachment #1: Type: text/plain, Size: 557 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=406657
---Test result---
##############################
Test: CheckPatch - PASS
##############################
Test: CheckGitLint - PASS
##############################
Test: CheckBuild - PASS
##############################
Test: MakeCheck - PASS
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Bluez PATCH v1] shared/gatt-client: Fix GATT client attribute read with offset
[not found] ` <CAPHZWUcgjK+NSTj_GozH8jv5AHOfEOxu7mM95VgCq0Zr02Dyhg@mail.gmail.com>
@ 2021-06-28 17:34 ` Luiz Augusto von Dentz
0 siblings, 0 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2021-06-28 17:34 UTC (permalink / raw)
To: Yun-hao Chung; +Cc: Bluez mailing list
Hi Howard,
On Mon, Jun 28, 2021 at 4:57 AM Yun-hao Chung <howardchung@google.com> wrote:
>
> Hi,
>
> Can we get a reply on this patch?
>
> Thanks,
> Howard
>
> On Mon, Dec 28, 2020 at 2:22 PM Howard Chung <howardchung@google.com> wrote:
>>
>> bluez always replies the whole value despite a user specify the offset.
>> This patch fixes the issue.
>>
>> Reviewed-by: sonnysasaka@chromium.org
>> ---
>>
>> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-06-28 17:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-28 6:22 [Bluez PATCH v1] shared/gatt-client: Fix GATT client attribute read with offset Howard Chung
2020-12-28 6:44 ` [Bluez,v1] " bluez.test.bot
[not found] ` <CAPHZWUcgjK+NSTj_GozH8jv5AHOfEOxu7mM95VgCq0Zr02Dyhg@mail.gmail.com>
2021-06-28 17:34 ` [Bluez PATCH v1] " Luiz Augusto von Dentz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).