11/*
22 * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
3- * Copyright (C) 2005-2014 , Anthony Minessale II <[email protected] > 3+ * Copyright (C) 2005-2025 , Anthony Minessale II <[email protected] > 44 *
55 * Version: MPL 1.1
66 *
@@ -5904,10 +5904,15 @@ static switch_status_t read_rtp_packet(switch_rtp_t *rtp_session, switch_size_t
59045904 rtp_session -> has_rtp = 0 ;
59055905 rtp_session -> has_ice = 0 ;
59065906 rtp_session -> has_rtcp = 0 ;
5907+
5908+ switch_mutex_lock (rtp_session -> ice_mutex );
59075909 if (rtp_session -> dtls ) {
59085910 rtp_session -> dtls -> bytes = 0 ;
59095911 rtp_session -> dtls -> data = NULL ;
59105912 }
5913+
5914+ switch_mutex_unlock (rtp_session -> ice_mutex );
5915+
59115916 memset (& rtp_session -> last_rtp_hdr , 0 , sizeof (rtp_session -> last_rtp_hdr ));
59125917
59135918 if (poll_status == SWITCH_STATUS_SUCCESS ) {
@@ -5927,10 +5932,14 @@ static switch_status_t read_rtp_packet(switch_rtp_t *rtp_session, switch_size_t
59275932 }
59285933
59295934 if ((* b >= 20 ) && (* b <= 64 )) {
5935+ switch_mutex_lock (rtp_session -> ice_mutex );
59305936 if (rtp_session -> dtls ) {
59315937 rtp_session -> dtls -> bytes = * bytes ;
59325938 rtp_session -> dtls -> data = (void * ) & rtp_session -> recv_msg ;
59335939 }
5940+
5941+ switch_mutex_unlock (rtp_session -> ice_mutex );
5942+
59345943 rtp_session -> has_ice = 0 ;
59355944 rtp_session -> has_rtp = 0 ;
59365945 rtp_session -> has_rtcp = 0 ;
0 commit comments