From 752f46ece9066ce34e6803d39e9db3a6471dc45f Mon Sep 17 00:00:00 2001 From: Mike Jerris Date: Mon, 19 Jun 2017 13:57:31 -0400 Subject: [PATCH] FS-10405: [core] Fix Timer destroy error on one legged calls --- src/switch_rtp.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/switch_rtp.c b/src/switch_rtp.c index eda3805728..a21bab2c5b 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -3973,8 +3973,12 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_change_interval(switch_rtp_t *rtp_ses if (rtp_session->timer.timer_interface) { switch_core_timer_destroy(&rtp_session->timer); + } + + if (rtp_session->write_timer.timer_interface) { switch_core_timer_destroy(&rtp_session->write_timer); } + if ((status = switch_core_timer_init(&rtp_session->timer, rtp_session->timer_name, ms_per_packet / 1000, samples_per_interval, rtp_session->pool)) == SWITCH_STATUS_SUCCESS) { @@ -4912,6 +4916,9 @@ SWITCH_DECLARE(void) switch_rtp_destroy(switch_rtp_t **rtp_session) #endif if ((*rtp_session)->timer.timer_interface) { switch_core_timer_destroy(&(*rtp_session)->timer); + } + + if ((*rtp_session)->timer.timer_interface) { switch_core_timer_destroy(&(*rtp_session)->write_timer); }