Skip to content

Update mbed-coap to version 5.1.2 #11911

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 1 commit into from
Nov 21, 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
7 changes: 7 additions & 0 deletions features/frameworks/mbed-coap/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Change Log

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

- Compiler warning cleanups.

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


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

- Delay the random initialization of message id to a later phase and not during init() so there is enough time
Expand Down
2 changes: 1 addition & 1 deletion features/frameworks/mbed-coap/doxygen/libcoap_doxy
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.

INPUT = ../nsdl-c
INPUT = ../mbed-coap

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
Expand Down
29 changes: 1 addition & 28 deletions features/frameworks/mbed-coap/source/sn_coap_protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ static uint8_t *sn_coap_protocol_linked_list_blockwise_payload_
static coap_blockwise_payload_s *sn_coap_protocol_linked_list_blockwise_search(struct coap_s *handle, const sn_nsdl_addr_s *src_addr_ptr, const uint8_t *token_ptr, uint8_t token_len);
static bool sn_coap_protocol_linked_list_blockwise_payload_search_compare_block_number(struct coap_s *handle, const sn_nsdl_addr_s *src_addr_ptr, const uint8_t *token_ptr, uint8_t token_len, uint32_t block_number);
static void sn_coap_protocol_linked_list_blockwise_payload_remove(struct coap_s *handle, coap_blockwise_payload_s *removed_payload_ptr);
static void sn_coap_protocol_linked_list_blockwise_payload_remove_oldest(struct coap_s *handle, uint8_t *token_ptr, uint8_t token_len);
static uint32_t sn_coap_protocol_linked_list_blockwise_payloads_get_len(struct coap_s *handle, const sn_nsdl_addr_s *src_addr_ptr, const uint8_t *token_ptr, uint8_t token_len);
static void sn_coap_protocol_handle_blockwise_timout(struct coap_s *handle);
static sn_coap_hdr_s *sn_coap_handle_blockwise_message(struct coap_s *handle, sn_nsdl_addr_s *src_addr_ptr, sn_coap_hdr_s *received_coap_msg_ptr, void *param);
Expand Down Expand Up @@ -1465,32 +1464,6 @@ static bool sn_coap_protocol_linked_list_blockwise_payload_search_compare_block_
return false;
}

/**************************************************************************//**
* \fn static void sn_coap_protocol_linked_list_blockwise_payload_remove_oldest(struct coap_s *handle)
*
* \brief Removes current stored blockwise paylod from Linked list
*****************************************************************************/

static void sn_coap_protocol_linked_list_blockwise_payload_remove_oldest(struct coap_s *handle, uint8_t *token_ptr, uint8_t token_len)
{
/* Remove oldest node in Linked list*/
if (token_ptr) {
ns_list_foreach(coap_blockwise_payload_s, removed_payload_ptr, &handle->linked_list_blockwise_received_payloads) {
if ((token_len == removed_payload_ptr->token_len) && !memcmp(removed_payload_ptr->token_ptr, token_ptr, token_len)) {
sn_coap_protocol_linked_list_blockwise_payload_remove(handle, removed_payload_ptr);
return;
}
}
} else {
ns_list_foreach(coap_blockwise_payload_s, removed_payload_ptr, &handle->linked_list_blockwise_received_payloads) {
if (!removed_payload_ptr->token_ptr) {
sn_coap_protocol_linked_list_blockwise_payload_remove(handle, removed_payload_ptr);
return;
}
}
}
}

/**************************************************************************//**
* \fn static void sn_coap_protocol_linked_list_blockwise_payload_remove(struct coap_s *handle,
* coap_blockwise_msg_s *removed_msg_ptr)
Expand Down Expand Up @@ -2286,7 +2259,7 @@ static bool sn_coap_handle_last_blockwise(struct coap_s *handle, const sn_nsdl_a
uint32_t whole_payload_len = sn_coap_protocol_linked_list_blockwise_payloads_get_len(handle, src_addr_ptr, received_coap_msg_ptr->token_ptr, received_coap_msg_ptr->token_len);
uint8_t *payload_ptr = sn_coap_protocol_linked_list_blockwise_payload_search(handle, src_addr_ptr, &payload_len, received_coap_msg_ptr->token_ptr, received_coap_msg_ptr->token_len);

tr_debug("sn_coap_handle_last_blockwise - whole len %d", whole_payload_len);
tr_debug("sn_coap_handle_last_blockwise - whole len %" PRIu32, whole_payload_len);
if (!whole_payload_len) {
return false;
}
Expand Down