@@ -71,7 +71,7 @@ struct sn_coap_hdr_;
7171#define SN_COAP_MAX_ALLOWED_RESENDING_BUFF_SIZE_BYTES 512 /**< Maximum allowed size of re-sending buffer */
7272#define SN_COAP_MAX_ALLOWED_RESPONSE_TIMEOUT 40 /**< Maximum allowed re-sending timeout */
7373
74- #define RESPONSE_RANDOM_FACTOR 1 /**< Resending random factor, value is specified in IETF CoAP specification */
74+ #define RESPONSE_RANDOM_FACTOR 1.5 /**< Resending random factor, value is specified in IETF CoAP specification */
7575
7676/* * For Message duplication detecting * */
7777
@@ -113,9 +113,12 @@ struct sn_coap_hdr_;
113113#define SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE 0 /**< Must be 2^x and x is at least 4. Suitable values: 0, 16, 32, 64, 128, 256, 512 and 1024 */
114114#endif
115115
116+ #ifdef MBED_CONF_MBED_CLIENT_SN_COAP_BLOCKWISE_MAX_TIME_DATA_STORED
117+ #define SN_COAP_BLOCKWISE_MAX_TIME_DATA_STORED MBED_CONF_MBED_CLIENT_SN_COAP_BLOCKWISE_MAX_TIME_DATA_STORED
118+ #endif
116119
117120#ifndef SN_COAP_BLOCKWISE_MAX_TIME_DATA_STORED
118- #define SN_COAP_BLOCKWISE_MAX_TIME_DATA_STORED 10 /**< Maximum time in seconds of data (messages and payload) to be stored for blockwising */
121+ #define SN_COAP_BLOCKWISE_MAX_TIME_DATA_STORED 60 /**< Maximum time in seconds of data (messages and payload) to be stored for blockwising */
119122#endif
120123
121124#ifdef YOTTA_CFG_COAP_MAX_INCOMING_BLOCK_MESSAGE_SIZE
@@ -156,16 +159,13 @@ typedef NS_LIST_HEAD(coap_send_msg_s, link) coap_send_msg_list_t;
156159/* Structure which is stored to Linked list for message duplication detection purposes */
157160typedef struct coap_duplication_info_ {
158161 uint32_t timestamp ; /* Tells when duplication information is stored to Linked list */
159-
160- uint8_t addr_len ;
161- uint8_t * addr_ptr ;
162- uint16_t port ;
163-
164162 uint16_t msg_id ;
165-
163+ uint16_t packet_len ;
164+ uint8_t * packet_ptr ;
166165 struct coap_s * coap ; /* CoAP library handle */
167-
168- ns_list_link_t link ;
166+ sn_nsdl_addr_s * address ;
167+ void * param ;
168+ ns_list_link_t link ;
169169} coap_duplication_info_s ;
170170
171171typedef NS_LIST_HEAD (coap_duplication_info_s , link ) coap_duplication_info_list_t ;
0 commit comments