@ -2152,11 +2152,15 @@ void call_destroy(struct call *c) {
if ( ! IS_OWN_CALL ( c ) )
goto no_stats_output ;
/ / / / / stats output
ilog ( LOG_INFO , " Final packet stats: " ) ;
for ( l = c - > monologues . head ; l ; l = l - > next ) {
ml = l - > data ;
/ / stats output only - no cleanups
ilog ( LOG_INFO , " --- Tag ' " STR_FORMAT_M " '%s " STR_FORMAT " %s, created "
" %u:%02u ago for branch ' " STR_FORMAT_M " ', in dialogue with ' " STR_FORMAT_M " ' " ,
STR_FMT_M ( & ml - > tag ) ,
@ -2174,6 +2178,8 @@ void call_destroy(struct call *c) {
for ( k = ml - > medias . head ; k ; k = k - > next ) {
md = k - > data ;
/ / stats output only - no cleanups
rtp_pt = __rtp_stats_codec ( md ) ;
# define MLL_PREFIX "------ Media #%u ("STR_FORMAT" over %s) using " /* media log line prefix */
# define MLL_COMMON /* common args */ \
@ -2189,7 +2195,7 @@ void call_destroy(struct call *c) {
for ( o = md - > streams . head ; o ; o = o - > next ) {
ps = o - > data ;
send_timer_put ( & ps - > send_timer ) ;
/ / stats output only - no cleanups
if ( PS_ISSET ( ps , FALLBACK_RTCP ) )
continue ;
@ -2210,20 +2216,16 @@ void call_destroy(struct call *c) {
rtpe_now . tv_sec - atomic64_get ( & ps - > last_packet ) ) ;
statistics_update_totals ( ps ) ;
}
ice_shutdown ( & md - > ice_agent ) ;
}
media_player_stop ( ml - > player ) ;
media_player_put ( & ml - > player ) ;
}
k = g_hash_table_get_values ( c - > ssrc_hash - > ht ) ;
for ( l = k ; l ; l = l - > next ) {
struct ssrc_entry_call * se = l - > data ;
/ / stats output only - no cleanups
if ( ! se - > stats_blocks . length | | ! se - > lowest_mos | | ! se - > highest_mos )
continue ;
@ -2245,6 +2247,8 @@ void call_destroy(struct call *c) {
g_list_free ( k ) ;
no_stats_output :
/ / cleanups
statistics_update_oneway ( c ) ;
cdr_update_entry ( c ) ;
@ -2252,6 +2256,7 @@ no_stats_output:
for ( l = c - > streams . head ; l ; l = l - > next ) {
ps = l - > data ;
send_timer_put ( & ps - > send_timer ) ;
__unkernelize ( ps ) ;
dtls_shutdown ( ps ) ;
ps - > selected_sfd = NULL ;
@ -2262,6 +2267,17 @@ no_stats_output:
ps - > rtcp_sink = NULL ;
}
for ( l = c - > medias . head ; l ; l = l - > next ) {
md = l - > data ;
ice_shutdown ( & md - > ice_agent ) ;
}
for ( l = c - > monologues . head ; l ; l = l - > next ) {
ml = l - > data ;
media_player_stop ( ml - > player ) ;
media_player_put ( & ml - > player ) ;
}
while ( c - > stream_fds . head ) {
sfd = g_queue_pop_head ( & c - > stream_fds ) ;
poller_del_item ( rtpe_poller , sfd - > socket . fd ) ;