]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Stasis: Use control queue to prevent crash. 57/2057/3
authorMark Michelson <mmichelson@digium.com>
Thu, 21 Jan 2016 16:58:02 +0000 (10:58 -0600)
committerMark Michelson <mmichelson@digium.com>
Fri, 22 Jan 2016 20:58:02 +0000 (14:58 -0600)
commita45eacebf326741821e7c954ac48e72c4c1b1274
treedf58c4c6b935475766f3a5a4cafa0c12e5cd4137
parent7866806fc3bbb716064fb9e4e0a1436e3325a637
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
res/stasis/control.c