Updating mbed-coap to version 4.0.9

Fixes error reported in Github.
 - https://github.com/ARMmbed/mbed-coap/issues/24
 - https://github.com/ARMmbed/mbed-os/issues/4374
pull/4940/head
Antti Yli-Tokola 2017-08-21 11:21:40 +03:00
parent c72d60a9e6
commit 83f7301800
4 changed files with 12 additions and 4 deletions

View File

@ -1,5 +1,13 @@
# Change Log
## [v4.0.9](https://github.com/ARMmbed/mbed-coap/releases/tag/v4.0.9)
-[Full Changelog](https://github.com/ARMmbed/mbed-coap/compare/v4.0.8...v4.0.9)
**Closed issues:**
- IOTCLT-1899 Maximum COAP message resending buffer size limited to 255 bytes
- IOTCLT-1888 Problem with blockwise transfers that are even increments of block_size
## [v4.0.8](https://github.com/ARMmbed/mbed-coap/releases/tag/v4.0.8)
-[Full Changelog](https://github.com/ARMmbed/mbed-coap/compare/v4.0.4...v4.0.8)

View File

@ -1,6 +1,6 @@
{
"name": "mbed-coap",
"version": "4.0.8",
"version": "4.0.9",
"description": "COAP library",
"keywords": [
"coap",

View File

@ -225,7 +225,7 @@ struct coap_s {
uint32_t system_time; /* System time seconds */
uint16_t sn_coap_block_data_size;
uint8_t sn_coap_resending_queue_msgs;
uint8_t sn_coap_resending_queue_bytes;
uint32_t sn_coap_resending_queue_bytes;
uint8_t sn_coap_resending_count;
uint8_t sn_coap_resending_intervall;
uint8_t sn_coap_duplication_buffer_size;

View File

@ -2027,7 +2027,7 @@ static sn_coap_hdr_s *sn_coap_handle_blockwise_message(struct coap_s *handle, sn
original_payload_len = stored_blockwise_msg_temp_ptr->coap_msg_ptr->payload_len;
original_payload_ptr = stored_blockwise_msg_temp_ptr->coap_msg_ptr->payload_ptr;
if ((block_size * (block_number + 1)) > stored_blockwise_msg_temp_ptr->coap_msg_ptr->payload_len) {
if ((block_size * (block_number + 1)) >= stored_blockwise_msg_temp_ptr->coap_msg_ptr->payload_len) {
src_coap_blockwise_ack_msg_ptr->payload_len = stored_blockwise_msg_temp_ptr->coap_msg_ptr->payload_len - (block_size * block_number);
src_coap_blockwise_ack_msg_ptr->payload_ptr = stored_blockwise_msg_temp_ptr->coap_msg_ptr->payload_ptr + (block_size * block_number);
}
@ -2080,7 +2080,7 @@ static sn_coap_hdr_s *sn_coap_handle_blockwise_message(struct coap_s *handle, sn
stored_blockwise_msg_temp_ptr->coap_msg_ptr->payload_len = original_payload_len;
stored_blockwise_msg_temp_ptr->coap_msg_ptr->payload_ptr = original_payload_ptr;
if ((block_size * (block_number + 1)) > stored_blockwise_msg_temp_ptr->coap_msg_ptr->payload_len) {
if ((block_size * (block_number + 1)) >= stored_blockwise_msg_temp_ptr->coap_msg_ptr->payload_len) {
sn_coap_protocol_linked_list_blockwise_msg_remove(handle, stored_blockwise_msg_temp_ptr);
}