Skip to content

Update mbed-coap to version 5.1.0 #11359

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion features/frameworks/mbed-coap/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
# Change Log

## [v4.8.1(https://github.com/ARMmbed/mbed-coap/releases/tag/v4.8.1)
## [v5.1.0](https://github.com/ARMmbed/mbed-coap/releases/tag/v5.1.0)

- Introduce SN_COAP_REDUCE_BLOCKWISE_HEAP_FOOTPRINT configuration flag.
Flag is disabled by default to keep the backward compatibility in place.
If flag is enabled, application must NOT free the payload when it gets the COAP_STATUS_PARSER_BLOCKWISE_MSG_RECEIVED status.
And application must call sn_coap_protocol_block_remove() instead.

-[Full Changelog](https://github.com/ARMmbed/mbed-coap/compare/v5.0.0...v5.1.0)

## [v5.0.0](https://github.com/ARMmbed/mbed-coap/releases/tag/v5.0.0)

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

-[Full Changelog](https://github.com/ARMmbed/mbed-coap/compare/v4.8.1...v5.0.0)

## [v4.8.1](https://github.com/ARMmbed/mbed-coap/releases/tag/v4.8.1)
- Store ACK's also into duplicate info list.
- ROM size optimization. Flash size has gone down ~1100 bytes.

Expand Down
2 changes: 1 addition & 1 deletion features/frameworks/mbed-coap/mbed-coap/sn_coap_header.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ typedef enum sn_coap_status_ {
COAP_STATUS_PARSER_BLOCKWISE_ACK = 4, /**< Acknowledgement for sent Blockwise message received */
COAP_STATUS_PARSER_BLOCKWISE_MSG_REJECTED = 5, /**< Blockwise message received but not supported by compiling switch */
COAP_STATUS_PARSER_BLOCKWISE_MSG_RECEIVED = 6, /**< Blockwise message fully received and returned to app.
User must take care of releasing whole payload of the blockwise messages */
User is responsible of freeing the data by calling sn_coap_protocol_block_remove() */
COAP_STATUS_BUILDER_MESSAGE_SENDING_FAILED = 7, /**< When re-transmissions have been done and ACK not received, CoAP library calls
RX callback with this status */

Expand Down
10 changes: 10 additions & 0 deletions features/frameworks/mbed-coap/mbed-coap/sn_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -260,4 +260,14 @@
#define SN_COAP_BLOCKWISE_INTERNAL_BLOCK_2_HANDLING_ENABLED 1
#endif

/**
* \def SN_COAP_REDUCE_BLOCKWISE_HEAP_FOOTPRINT
* \brief A heap optimization switch, which removes unnecessary copy of the blockwise data.
* If enabled, application must NOT free the payload when it gets the COAP_STATUS_PARSER_BLOCKWISE_MSG_RECEIVED status.
* Application must call sn_coap_protocol_block_remove() instead.
*/
#ifndef SN_COAP_REDUCE_BLOCKWISE_HEAP_FOOTPRINT
#define SN_COAP_REDUCE_BLOCKWISE_HEAP_FOOTPRINT 0 /**< Disabled by default */
#endif

#endif // SN_CONFIG_H
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ typedef struct coap_blockwise_payload_ {

uint16_t payload_len;
uint8_t *payload_ptr;
unsigned int use_size1:1;

ns_list_link_t link;
} coap_blockwise_payload_s;
Expand Down
Loading