You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@mynewt.apache.org by "vandy (via GitHub)" <gi...@apache.org> on 2024/10/19 10:55:50 UTC
Re: [PR] Offset field in struct ble_gatt_access_ctxt as an indication of long attribute read [mynewt-nimble]
vandy commented on code in PR #1846:
URL: https://github.com/apache/mynewt-nimble/pull/1846#discussion_r1807287685
##########
nimble/host/src/ble_gatts.c:
##########
@@ -407,21 +407,19 @@ ble_gatts_chr_val_access(uint16_t conn_handle, uint16_t attr_handle,
uint8_t att_op, uint16_t offset,
struct os_mbuf **om, void *arg)
{
- const struct ble_gatt_chr_def *chr_def;
struct ble_gatt_access_ctxt gatt_ctxt;
- int rc;
- chr_def = arg;
+ const struct ble_gatt_chr_def *chr_def = arg;
BLE_HS_DBG_ASSERT(chr_def != NULL && chr_def->access_cb != NULL);
gatt_ctxt.op = ble_gatts_chr_op(att_op);
gatt_ctxt.chr = chr_def;
+ gatt_ctxt.offset = offset;
ble_gatts_chr_inc_val_stat(gatt_ctxt.op);
- rc = ble_gatts_val_access(conn_handle, attr_handle, offset, &gatt_ctxt, om,
- chr_def->access_cb, chr_def->arg);
- return rc;
+ return ble_gatts_val_access(conn_handle, attr_handle, offset, &gatt_ctxt, om,
Review Comment:
I've reverted reformat code changes, only offset is left.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@mynewt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org