@@ -68,7 +68,7 @@ static int8_t sn_coap_convert_block_size(uint16_t block_size);
68
68
static sn_coap_hdr_s * sn_coap_protocol_copy_header (struct coap_s * handle , sn_coap_hdr_s * source_header_ptr );
69
69
#endif
70
70
#if ENABLE_RESENDINGS
71
- static void sn_coap_protocol_linked_list_send_msg_store (struct coap_s * handle , sn_nsdl_addr_s * dst_addr_ptr , uint16_t send_packet_data_len , uint8_t * send_packet_data_ptr , uint32_t sending_time , void * param , uint8_t * uri_path_ptr , uint8_t uri_path_len );
71
+ static void sn_coap_protocol_linked_list_send_msg_store (struct coap_s * handle , sn_nsdl_addr_s * dst_addr_ptr , uint16_t send_packet_data_len , uint8_t * send_packet_data_ptr , uint32_t sending_time , void * param );
72
72
static sn_nsdl_transmit_s * sn_coap_protocol_linked_list_send_msg_search (struct coap_s * handle ,sn_nsdl_addr_s * src_addr_ptr , uint16_t msg_id );
73
73
static void sn_coap_protocol_linked_list_send_msg_remove (struct coap_s * handle , sn_nsdl_addr_s * src_addr_ptr , uint16_t msg_id );
74
74
static coap_send_msg_s * sn_coap_protocol_allocate_mem_for_msg (struct coap_s * handle , sn_nsdl_addr_s * dst_addr_ptr , uint16_t packet_data_len );
@@ -314,10 +314,6 @@ void sn_coap_protocol_clear_retransmission_buffer(struct coap_s *handle)
314
314
handle -> sn_coap_protocol_free (tmp -> send_msg_ptr -> packet_ptr );
315
315
tmp -> send_msg_ptr -> packet_ptr = 0 ;
316
316
}
317
- if (tmp -> send_msg_ptr -> uri_path_ptr ) {
318
- handle -> sn_coap_protocol_free (tmp -> send_msg_ptr -> uri_path_ptr );
319
- tmp -> send_msg_ptr -> uri_path_ptr = 0 ;
320
- }
321
317
handle -> sn_coap_protocol_free (tmp -> send_msg_ptr );
322
318
tmp -> send_msg_ptr = 0 ;
323
319
}
@@ -448,7 +444,7 @@ int16_t sn_coap_protocol_build(struct coap_s *handle, sn_nsdl_addr_s *dst_addr_p
448
444
/* Store message to Linked list for resending purposes */
449
445
sn_coap_protocol_linked_list_send_msg_store (handle , dst_addr_ptr , byte_count_built , dst_packet_data_ptr ,
450
446
handle -> system_time + (uint32_t )(handle -> sn_coap_resending_intervall * RESPONSE_RANDOM_FACTOR ),
451
- param , src_coap_msg_ptr -> uri_path_ptr , src_coap_msg_ptr -> uri_path_len );
447
+ param );
452
448
}
453
449
454
450
#endif /* ENABLE_RESENDINGS */
@@ -703,15 +699,6 @@ sn_coap_hdr_s *sn_coap_protocol_parse(struct coap_s *handle, sn_nsdl_addr_s *src
703
699
removed_msg_ptr = sn_coap_protocol_linked_list_send_msg_search (handle , src_addr_ptr , returned_dst_coap_msg_ptr -> msg_id );
704
700
705
701
if (removed_msg_ptr != NULL ) {
706
- if (returned_dst_coap_msg_ptr -> msg_type == COAP_MSG_TYPE_RESET ) {
707
- if (removed_msg_ptr -> uri_path_len ) {
708
- returned_dst_coap_msg_ptr -> uri_path_ptr = handle -> sn_coap_protocol_malloc (removed_msg_ptr -> uri_path_len );
709
- if (returned_dst_coap_msg_ptr -> uri_path_ptr != NULL ) {
710
- memcpy (returned_dst_coap_msg_ptr -> uri_path_ptr , removed_msg_ptr -> uri_path_ptr , removed_msg_ptr -> uri_path_len );
711
- returned_dst_coap_msg_ptr -> uri_path_len = removed_msg_ptr -> uri_path_len ;
712
- }
713
- }
714
- }
715
702
/* Remove resending message from active message resending Linked list */
716
703
sn_coap_protocol_linked_list_send_msg_remove (handle , src_addr_ptr , returned_dst_coap_msg_ptr -> msg_id );
717
704
}
@@ -814,7 +801,7 @@ int8_t sn_coap_protocol_exec(struct coap_s *handle, uint32_t current_time)
814
801
*****************************************************************************/
815
802
816
803
static void sn_coap_protocol_linked_list_send_msg_store (struct coap_s * handle , sn_nsdl_addr_s * dst_addr_ptr , uint16_t send_packet_data_len ,
817
- uint8_t * send_packet_data_ptr , uint32_t sending_time , void * param , uint8_t * uri_path_ptr , uint8_t uri_path_len )
804
+ uint8_t * send_packet_data_ptr , uint32_t sending_time , void * param )
818
805
{
819
806
820
807
coap_send_msg_s * stored_msg_ptr = NULL ;
@@ -862,16 +849,6 @@ static void sn_coap_protocol_linked_list_send_msg_store(struct coap_s *handle, s
862
849
stored_msg_ptr -> coap = handle ;
863
850
stored_msg_ptr -> param = param ;
864
851
865
- if (uri_path_len ) {
866
- stored_msg_ptr -> send_msg_ptr -> uri_path_ptr = handle -> sn_coap_protocol_malloc (uri_path_len );
867
- if (stored_msg_ptr -> send_msg_ptr -> uri_path_ptr == NULL ){
868
- return ;
869
- }
870
- stored_msg_ptr -> send_msg_ptr -> uri_path_len = uri_path_len ;
871
- memcpy (stored_msg_ptr -> send_msg_ptr -> uri_path_ptr , uri_path_ptr , uri_path_len );
872
- }
873
-
874
-
875
852
/* Storing Resending message to Linked list */
876
853
ns_list_add_to_end (& handle -> linked_list_resent_msgs , stored_msg_ptr );
877
854
++ handle -> count_resent_msgs ;
@@ -1448,11 +1425,6 @@ static void sn_coap_protocol_release_allocated_send_msg_mem(struct coap_s *handl
1448
1425
freed_send_msg_ptr -> send_msg_ptr -> packet_ptr = 0 ;
1449
1426
}
1450
1427
1451
- if (freed_send_msg_ptr -> send_msg_ptr -> uri_path_ptr != NULL ) {
1452
- handle -> sn_coap_protocol_free (freed_send_msg_ptr -> send_msg_ptr -> uri_path_ptr );
1453
- freed_send_msg_ptr -> send_msg_ptr -> uri_path_ptr = 0 ;
1454
- }
1455
-
1456
1428
handle -> sn_coap_protocol_free (freed_send_msg_ptr -> send_msg_ptr );
1457
1429
freed_send_msg_ptr -> send_msg_ptr = 0 ;
1458
1430
}
@@ -1878,7 +1850,7 @@ static sn_coap_hdr_s *sn_coap_handle_blockwise_message(struct coap_s *handle, sn
1878
1850
sn_coap_protocol_linked_list_send_msg_store (handle , src_addr_ptr ,
1879
1851
dst_packed_data_needed_mem ,
1880
1852
dst_ack_packet_data_ptr ,
1881
- handle -> system_time + (uint32_t )(handle -> sn_coap_resending_intervall * RESPONSE_RANDOM_FACTOR ), param , NULL , 0 );
1853
+ handle -> system_time + (uint32_t )(handle -> sn_coap_resending_intervall * RESPONSE_RANDOM_FACTOR ), param );
1882
1854
#endif
1883
1855
handle -> sn_coap_protocol_free (dst_ack_packet_data_ptr );
1884
1856
dst_ack_packet_data_ptr = 0 ;
0 commit comments