mirror of https://github.com/ARMmbed/mbed-os.git
Update mbed-coap to version 4.3.0
Add new api to clear whole sent blockwise message listpull/6461/head
parent
20d9b4a17e
commit
3ba208a96d
|
@ -1,5 +1,11 @@
|
|||
# Change Log
|
||||
|
||||
## [v4.3.0](https://github.com/ARMmbed/mbed-coap/releases/tag/v4.3.0)
|
||||
**New feature:**
|
||||
- Add new API which clears the whole sent blockwise message list
|
||||
|
||||
-[Full Changelog](https://github.com/ARMmbed/mbed-coap/compare/v4.2.0...v4.3.0)
|
||||
|
||||
## [v4.2.0](https://github.com/ARMmbed/mbed-coap/releases/tag/v4.2.0)
|
||||
**New feature:**
|
||||
- Add new API to remove sent blockwise message from the linked list
|
||||
|
|
|
@ -247,6 +247,15 @@ extern int8_t sn_coap_convert_block_size(uint16_t block_size);
|
|||
*/
|
||||
extern int8_t sn_coap_protocol_handle_block2_response_internally(struct coap_s *handle, uint8_t handle_response);
|
||||
|
||||
/**
|
||||
* \fn void sn_coap_protocol_clear_sent_blockwise_messages(struct coap_s *handle)
|
||||
*
|
||||
* \brief This function clears all the sent blockwise messages from the linked list.
|
||||
*
|
||||
* \param *handle Pointer to CoAP library handle
|
||||
*/
|
||||
extern void sn_coap_protocol_clear_sent_blockwise_messages(struct coap_s *handle);
|
||||
|
||||
#endif /* SN_COAP_PROTOCOL_H_ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "mbed-coap",
|
||||
"version": "4.2.0",
|
||||
"version": "4.3.0",
|
||||
"description": "COAP library",
|
||||
"keywords": [
|
||||
"coap",
|
||||
|
|
|
@ -256,6 +256,27 @@ int8_t sn_coap_protocol_set_block_size(struct coap_s *handle, uint16_t block_siz
|
|||
|
||||
}
|
||||
|
||||
void sn_coap_protocol_clear_sent_blockwise_messages(struct coap_s *handle)
|
||||
{
|
||||
(void) handle;
|
||||
#if SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE
|
||||
if (handle == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Loop all stored Blockwise messages in Linked list */
|
||||
ns_list_foreach_safe(coap_blockwise_msg_s, removed_blocwise_msg_ptr, &handle->linked_list_blockwise_sent_msgs) {
|
||||
if (removed_blocwise_msg_ptr->coap_msg_ptr) {
|
||||
handle->sn_coap_protocol_free(removed_blocwise_msg_ptr->coap_msg_ptr->payload_ptr);
|
||||
removed_blocwise_msg_ptr->coap_msg_ptr->payload_ptr = 0;
|
||||
sn_coap_parser_release_allocated_coap_msg_mem(handle, removed_blocwise_msg_ptr->coap_msg_ptr);
|
||||
removed_blocwise_msg_ptr->coap_msg_ptr = 0;
|
||||
}
|
||||
sn_coap_protocol_linked_list_blockwise_msg_remove(handle, removed_blocwise_msg_ptr);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
int8_t sn_coap_protocol_set_duplicate_buffer_size(struct coap_s *handle, uint8_t message_count)
|
||||
{
|
||||
(void) handle;
|
||||
|
|
Loading…
Reference in New Issue