Skip to content

Commit d14454b

Browse files
authored
Merge pull request #13283 from paul-szczepanek-arm/fix-fixed-size-att-write
BLE: Cordio bugfix fixed size writes under size must be allowed
2 parents 640da33 + c0391dc commit d14454b

File tree

1 file changed

+3
-9
lines changed
  • features/FEATURE_BLE/targets/TARGET_CORDIO/stack/ble-host/sources/stack/att

1 file changed

+3
-9
lines changed

features/FEATURE_BLE/targets/TARGET_CORDIO/stack/ble-host/sources/stack/att/atts_write.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,9 @@ void attsProcWrite(attsCcb_t *pCcb, uint16_t len, uint8_t *pPacket)
145145
{
146146
/* err has been set; fail */
147147
}
148-
/* verify write length, fixed length */
149-
else if (((pAttr->settings & ATTS_SET_VARIABLE_LEN) == 0) &&
150-
(writeLen != pAttr->maxLen))
151-
{
152-
err = ATT_ERR_LENGTH;
153-
}
154-
/* verify write length, variable length */
155-
else if (((pAttr->settings & ATTS_SET_VARIABLE_LEN) != 0) &&
156-
(writeLen > pAttr->maxLen))
148+
/* verify write length within max length, fixed size writes within size must be allowed
149+
* as described in CORE SPECIFICATION Version 5.2, Vol 3, Part F, 3.4.5.1 */
150+
else if (writeLen > pAttr->maxLen)
157151
{
158152
err = ATT_ERR_LENGTH;
159153
}

0 commit comments

Comments
 (0)