Loading system/stack/gatt/gatt_api.cc +1 −0 Original line number Diff line number Diff line Loading @@ -708,6 +708,7 @@ tGATT_STATUS GATTC_Read(uint16_t conn_id, tGATT_READ_TYPE type, p_clcb->op_subtype = type; p_clcb->auth_req = p_read->by_handle.auth_req; p_clcb->counter = 0; p_clcb->read_req_current_mtu = p_tcb->payload_size; switch (type) { case GATT_READ_BY_TYPE: Loading system/stack/gatt/gatt_cl.cc +11 −4 Original line number Diff line number Diff line Loading @@ -913,11 +913,18 @@ void gatt_process_read_rsp(tGATT_TCB& tcb, tGATT_CLCB* p_clcb, memcpy(p_clcb->p_attr_buf + offset, p, len); /* send next request if needed */ /* full packet for read or read blob rsp */ bool packet_is_full; if (tcb.payload_size == p_clcb->read_req_current_mtu) { packet_is_full = (len == (tcb.payload_size - 1)); } else { packet_is_full = (len == (p_clcb->read_req_current_mtu - 1) || len == (tcb.payload_size - 1)); p_clcb->read_req_current_mtu = tcb.payload_size; } if (len == (tcb.payload_size - 1) && /* full packet for read or read blob rsp */ len + offset < GATT_MAX_ATTR_LEN) { /* send next request if needed */ if (packet_is_full && (len + offset < GATT_MAX_ATTR_LEN)) { VLOG(1) << StringPrintf( "full pkt issue read blob for remianing bytes old offset=%d " "len=%d new offset=%d", Loading system/stack/gatt/gatt_int.h +2 −0 Original line number Diff line number Diff line Loading @@ -323,6 +323,8 @@ struct tGATT_CLCB { bool in_use; alarm_t* gatt_rsp_timer_ent; /* peer response timer */ uint8_t retry_count; uint16_t read_req_current_mtu; /* This is the MTU value that the read was initiated with */ }; typedef struct { Loading Loading
system/stack/gatt/gatt_api.cc +1 −0 Original line number Diff line number Diff line Loading @@ -708,6 +708,7 @@ tGATT_STATUS GATTC_Read(uint16_t conn_id, tGATT_READ_TYPE type, p_clcb->op_subtype = type; p_clcb->auth_req = p_read->by_handle.auth_req; p_clcb->counter = 0; p_clcb->read_req_current_mtu = p_tcb->payload_size; switch (type) { case GATT_READ_BY_TYPE: Loading
system/stack/gatt/gatt_cl.cc +11 −4 Original line number Diff line number Diff line Loading @@ -913,11 +913,18 @@ void gatt_process_read_rsp(tGATT_TCB& tcb, tGATT_CLCB* p_clcb, memcpy(p_clcb->p_attr_buf + offset, p, len); /* send next request if needed */ /* full packet for read or read blob rsp */ bool packet_is_full; if (tcb.payload_size == p_clcb->read_req_current_mtu) { packet_is_full = (len == (tcb.payload_size - 1)); } else { packet_is_full = (len == (p_clcb->read_req_current_mtu - 1) || len == (tcb.payload_size - 1)); p_clcb->read_req_current_mtu = tcb.payload_size; } if (len == (tcb.payload_size - 1) && /* full packet for read or read blob rsp */ len + offset < GATT_MAX_ATTR_LEN) { /* send next request if needed */ if (packet_is_full && (len + offset < GATT_MAX_ATTR_LEN)) { VLOG(1) << StringPrintf( "full pkt issue read blob for remianing bytes old offset=%d " "len=%d new offset=%d", Loading
system/stack/gatt/gatt_int.h +2 −0 Original line number Diff line number Diff line Loading @@ -323,6 +323,8 @@ struct tGATT_CLCB { bool in_use; alarm_t* gatt_rsp_timer_ent; /* peer response timer */ uint8_t retry_count; uint16_t read_req_current_mtu; /* This is the MTU value that the read was initiated with */ }; typedef struct { Loading