mirror of https://github.com/ARMmbed/mbed-os.git
Update mbed-coap to version 4.7.0
- Add function that can be used to clear the received blockwise payloads for example in the case of a connection error. - Silence compiler warning when CoAP duplicate detection is enabled.pull/8273/head
parent
6b85ec7c57
commit
4c692c6b45
|
@ -1,5 +1,12 @@
|
|||
# Change Log
|
||||
|
||||
## [v4.7.0](https://github.com/ARMmbed/mbed-coap/releases/tag/v4.7.0)
|
||||
|
||||
- Add function that can be used to clear the received blockwise payloads for example in the case of a connection error.
|
||||
- Silence compiler warning when CoAP duplicate detection is enabled.
|
||||
|
||||
-[Full Changelog](https://github.com/ARMmbed/mbed-coap/compare/v4.6.3...v4.7.0)
|
||||
|
||||
## [v4.6.3](https://github.com/ARMmbed/mbed-coap/releases/tag/v4.6.3)
|
||||
|
||||
- Bug fix: Remove timed out blockwise message from resend queue. If blockwise message was timed out message was still kept in the resend queue which causes unnecessary reconnections on client side.
|
||||
|
|
|
@ -268,6 +268,15 @@ extern int8_t sn_coap_protocol_handle_block2_response_internally(struct coap_s *
|
|||
*/
|
||||
extern void sn_coap_protocol_clear_sent_blockwise_messages(struct coap_s *handle);
|
||||
|
||||
/**
|
||||
* \fn void sn_coap_protocol_clear_received_blockwise_messages(struct coap_s *handle)
|
||||
*
|
||||
* \brief This function clears all the received blockwise messages from the linked list.
|
||||
*
|
||||
* \param *handle Pointer to CoAP library handle
|
||||
*/
|
||||
extern void sn_coap_protocol_clear_received_blockwise_messages(struct coap_s *handle);
|
||||
|
||||
/**
|
||||
* \fn void sn_coap_protocol_send_rst(struct coap_s *handle, uint16_t msg_id, sn_nsdl_addr_s *addr_ptr, void *param)
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "mbed-coap",
|
||||
"version": "4.6.3",
|
||||
"version": "4.7.0",
|
||||
"description": "COAP library",
|
||||
"keywords": [
|
||||
"coap",
|
||||
|
|
|
@ -81,19 +81,16 @@ struct sn_coap_hdr_;
|
|||
|
||||
/* Init value for the maximum count of messages to be stored for duplication detection */
|
||||
/* Setting of this value to 0 will disable duplication check, also reduce use of ROM memory */
|
||||
|
||||
// Keep the old flag to maintain backward compatibility
|
||||
#ifndef SN_COAP_DUPLICATION_MAX_MSGS_COUNT
|
||||
#define SN_COAP_DUPLICATION_MAX_MSGS_COUNT 0
|
||||
#endif
|
||||
|
||||
#ifdef YOTTA_CFG_COAP_DUPLICATION_MAX_MSGS_COUNT
|
||||
#define SN_COAP_DUPLICATION_MAX_MSGS_COUNT YOTTA_CFG_COAP_DUPLICATION_MAX_MSGS_COUNT
|
||||
#elif defined MBED_CONF_MBED_CLIENT_SN_COAP_DUPLICATION_MAX_MSGS_COUNT
|
||||
#define SN_COAP_DUPLICATION_MAX_MSGS_COUNT MBED_CONF_MBED_CLIENT_SN_COAP_DUPLICATION_MAX_MSGS_COUNT
|
||||
#endif
|
||||
|
||||
|
||||
// Keep the old flag to maintain backward compatibility
|
||||
#ifndef SN_COAP_DUPLICATION_MAX_MSGS_COUNT
|
||||
#define SN_COAP_DUPLICATION_MAX_MSGS_COUNT 0
|
||||
#endif
|
||||
|
||||
/* Maximum allowed number of saved messages for duplicate searching */
|
||||
#define SN_COAP_MAX_ALLOWED_DUPLICATION_MESSAGE_COUNT 6
|
||||
|
|
|
@ -257,6 +257,21 @@ void sn_coap_protocol_clear_sent_blockwise_messages(struct coap_s *handle)
|
|||
#endif
|
||||
}
|
||||
|
||||
void sn_coap_protocol_clear_received_blockwise_messages(struct coap_s *handle)
|
||||
{
|
||||
(void) handle;
|
||||
#if SN_COAP_BLOCKWISE_ENABLED || SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE
|
||||
if (handle == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Loop all stored Blockwise messages in Linked list */
|
||||
ns_list_foreach_safe(coap_blockwise_payload_s, removed_blockwise_payload_ptr, &handle->linked_list_blockwise_received_payloads) {
|
||||
sn_coap_protocol_linked_list_blockwise_payload_remove(handle, removed_blockwise_payload_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