Skip to content

Commit 8062837

Browse files
author
Yogesh Pande
committed
Initialize remove_from_list flag to true
1 parent 95b657b commit 8062837

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

features/FEATURE_COMMON_PAL/mbed-coap/source/sn_coap_protocol.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -642,14 +642,12 @@ sn_coap_hdr_s *sn_coap_protocol_parse(struct coap_s *handle, sn_nsdl_addr_s *src
642642
/* Remove from the list if not an notification message.
643643
* Initial notification message is needed for sending rest of the blocks (GET request).
644644
*/
645-
bool remove_from_the_list = false;
645+
bool remove_from_the_list = true;
646646
if (stored_blockwise_msg_temp_ptr) {
647647
if (stored_blockwise_msg_temp_ptr->coap_msg_ptr &&
648648
stored_blockwise_msg_temp_ptr->coap_msg_ptr->options_list_ptr &&
649649
stored_blockwise_msg_temp_ptr->coap_msg_ptr->options_list_ptr->observe != COAP_OBSERVE_NONE) {
650650
remove_from_the_list = false;
651-
} else {
652-
remove_from_the_list = true;
653651
}
654652
}
655653
if (remove_from_the_list) {

0 commit comments

Comments
 (0)