Skip to content

Commit d74326e

Browse files
author
Antti Yli-Tokola
committed
Update changelog about the breaking change
1 parent 2774e3f commit d74326e

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

features/frameworks/mbed-coap/CHANGELOG.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,24 @@
11
# Change Log
22

33
## [v5.0.0](https://github.com/ARMmbed/mbed-coap/releases/tag/v5.0.0)
4+
**NOTE! Blockwise functionality has changed and it is not backward compatible. User is now responsible of freeing the data by calling sn_coap_protocol_block_remove() and must NOT free the payload anymore separately.**
5+
6+
Here is the change needed on application side:
7+
8+
```
9+
if (received_coap_message->coap_status == COAP_STATUS_PARSER_BLOCKWISE_MSG_RECEIVED) {
10+
free(received_coap_header->payload_ptr);
11+
}
12+
13+
-->
14+
15+
if (received_coap_message->coap_status == COAP_STATUS_PARSER_BLOCKWISE_MSG_RECEIVED) {
16+
// Free the block message from the CoAP list
17+
sn_nsdl_remove_coap_block(_nsdl_handle, address, received_coap_header->payload_len, received_coap_header->payload_ptr);
18+
}
19+
```
420

521
- Reduce heap footprint by storing only single block when receiving a blockwise message.
6-
* User is now responsible of freeing the data by calling sn_coap_protocol_block_remove() and must not free the payload separately.
722
- Bug fix: Request blockwise transfer if incoming payload length is too large and when it comes without block indication.
823

924
-[Full Changelog](https://github.com/ARMmbed/mbed-coap/compare/v4.8.1...v5.0.0)
@@ -235,3 +250,4 @@ Extend blockwise message transfer status to have states for sending as well.
235250
**New feature**
236251

237252
- Initial release of mbed-coap separated from mbed-client-c
253+

0 commit comments

Comments
 (0)