Skip to content

Commit

Permalink
[Core] Fix race between switch_ivr_park_session() and the state machi…
Browse files Browse the repository at this point in the history
…ne. switch_core_session_run() wants to clear the CF_TRANSFER flag on state change while parking sets the flag.
  • Loading branch information
andywolk committed Mar 17, 2021
1 parent 2ca0d02 commit 8e2234a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/switch_ivr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

}

Expand Down

1 comment on commit 8e2234a

@andywolk
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.