]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Stasis: Use control queue to prevent crash. 56/2056/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:55:28 +0000 (14:55 -0600)
commiteedd77fda03a657375d106427bcd3838fa90ad86
tree4f30fef935921a1fc0164b0a2bc4036b0494c4f3
parent113adf336a8715ba28c29e7997a9293f82b92aa4
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