From: Andrey Volk Date: Sat, 20 Feb 2021 18:14:15 +0000 (+0300) Subject: [Core] Fix race between switch_ivr_park_session() and the state machine. switch_core_... X-Git-Tag: v1.10.6^2~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e2234a205f9b19b628670df6d517974c62b2317;p=thirdparty%2Ffreeswitch.git [Core] Fix race between switch_ivr_park_session() and the state machine. switch_core_session_run() wants to clear the CF_TRANSFER flag on state change while parking sets the flag. --- diff --git a/src/switch_ivr.c b/src/switch_ivr.c index 9aa05fcd73..f1493a723d 100644 --- a/src/switch_ivr.c +++ b/src/switch_ivr.c @@ -3522,8 +3522,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_generate_json_cdr(switch_core_session SWITCH_DECLARE(void) switch_ivr_park_session(switch_core_session_t *session) { switch_channel_t *channel = switch_core_session_get_channel(session); - switch_channel_set_state(channel, CS_PARK); switch_channel_set_flag(channel, CF_TRANSFER); + switch_channel_set_state(channel, CS_PARK); }