call recovery_track on recovering channels once the recovery has completed and fix race condition with repeated recovery

This commit is contained in:
Anthony Minessale 2014-07-16 21:40:18 +05:00
parent b6566b8354
commit 91d405a2c1
3 changed files with 6 additions and 1 deletions

View File

@ -6134,7 +6134,6 @@ static void sofia_handle_sip_r_invite(switch_core_session_t *session, int status
extract_header_vars(profile, sip, session, nh); extract_header_vars(profile, sip, session, nh);
extract_vars(profile, sip, session); extract_vars(profile, sip, session);
switch_core_recovery_track(session);
switch_channel_clear_flag(tech_pvt->channel, CF_RECOVERING); switch_channel_clear_flag(tech_pvt->channel, CF_RECOVERING);
} }

View File

@ -1990,6 +1990,10 @@ SWITCH_DECLARE(void) switch_channel_clear_flag(switch_channel_t *channel, switch
switch_core_session_wake_video_thread(channel->session); switch_core_session_wake_video_thread(channel->session);
} }
if (flag == CF_RECOVERING && !channel->hangup_cause) {
switch_core_recovery_track(channel->session);
}
} }

View File

@ -48,6 +48,8 @@ static void switch_core_standard_on_init(switch_core_session_t *session)
switch_channel_set_state(session->channel, CS_ROUTING); switch_channel_set_state(session->channel, CS_ROUTING);
} }
} }
switch_channel_clear_flag(session->channel, CF_RECOVERING);
} }
static void switch_core_standard_on_hangup(switch_core_session_t *session) static void switch_core_standard_on_hangup(switch_core_session_t *session)