[Asterisk-code-review] Stasis: Use control queue to prevent crash. (asterisk[13])

Mark Michelson asteriskteam at digium.com
Fri Jan 22 14:57:45 CST 2016


Hello Kevin Harwell, Anonymous Coward #1000019,

I'd like you to reexamine a change.  Please visit

    https://gerrit.asterisk.org/2056

to look at the new patch set (#3).

Change subject: Stasis: Use control queue to prevent crash.
......................................................................

Stasis: Use control queue to prevent crash.

A crash occurred when attempting to set a channel variable on a channel
that had already been hung up. This is because there is a small window
between when a control is grabbed and when the channel variable is set
that the channel can be hung up.

The fix here is to queue the setting of the channel variable onto the
control queue. This way, the manipulation of the channel happens in a
thread where it is safe to be done.

In this change, I also noticed that the setting of bridge roles on
channels was being done outside of the control queue, so I also changed
those operations to be done in the control queue.

ASTERISK-25709 #close
Reported by Mark Michelson

Change-Id: I2a0a4d51bce6fba6f1d9954e40935e42f366ea78
---
M res/stasis/control.c
1 file changed, 47 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/56/2056/3
-- 
To view, visit https://gerrit.asterisk.org/2056
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2a0a4d51bce6fba6f1d9954e40935e42f366ea78
Gerrit-PatchSet: 3
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>



More information about the asterisk-code-review mailing list