]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[Core] Fix race between switch_ivr_park_session() and the state machine. switch_core_...
authorAndrey Volk <andywolk@gmail.com>
Sat, 20 Feb 2021 18:14:15 +0000 (21:14 +0300)
committerAndrey Volk <andywolk@gmail.com>
Wed, 17 Mar 2021 16:45:08 +0000 (19:45 +0300)
src/switch_ivr.c

index 9aa05fcd739f7dc0bae9dd3d7d1689c45f577b4f..f1493a723dc5645cccf49144c88b6c9a2d504c3e 100644 (file)
@@ -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);
 
 }