GATT multi read: account for length for variable length read The response will contain length, then the bytes with actual content. Account for the 2 byte length field when computing how much data can be squezed into a packet. Bug: 227618988 Test: compilation Change-Id: I6ddee3e5c50ce395fa4cc1b538d256a406a415f0
diff --git a/stack/gatt/gatt_sr.cc b/stack/gatt/gatt_sr.cc index c0aedfa..39c7125 100644 --- a/stack/gatt/gatt_sr.cc +++ b/stack/gatt/gatt_sr.cc
@@ -172,6 +172,9 @@ if (p_rsp != NULL) { total_len = (p_buf->len + p_rsp->attr_value.len); + if (p_cmd->multi_req.variable_len) { + total_len += 2; + } if (total_len > mtu) { /* just send the partial response for the overflow case */