]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Stasis: Fix StasisStart/End order and missing events
authorKinsey Moore <kmoore@digium.com>
Mon, 8 Dec 2014 15:41:39 +0000 (15:41 +0000)
committerKinsey Moore <kmoore@digium.com>
Mon, 8 Dec 2014 15:41:39 +0000 (15:41 +0000)
commitc71a903b8497060a0f5ebcf4babafccd101a70ad
tree663d56af4d4142aa32c28ddc8046b986506d56c0
parent6dabd8d6876fab4618cca9acad839ed9b646e85e
Stasis: Fix StasisStart/End order and missing events

This corrects several bugs that currently exist in the stasis
application code.

* After a masquerade, the resulting channels have channel topics that
  do not match their uniqueids
** Masquerades now swap channel topics appropriately
* StasisStart and StasisEnd messages are leaked to observer
  applications due to being published on channel topics
** StasisStart and StasisEnd publishing is now properly restricted
   to controlling apps via app topics
* Race conditions exist where StasisStart and StasisEnd messages due to
  a masquerade may be received out of order due to being published on
  different topics
** These messages are now published directly on the app topic so this
   is now a non-issue
* StasisEnds are sometimes missing when sent due to masquerades and
  bridge swaps into and out of Stasis()
** This was due to StasisEnd processing adjusting message-sent flags
   after Stasis() had already exited and Stasis() had been re-entered
** This was corrected by adjusting these flags prior to sending the
   message while the initial Stasis() application was still shutting
   down

Review: https://reviewboard.asterisk.org/r/4213/
ASTERISK-24537 #close
Reported by: Matt DiMeo

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@429061 65c4cc65-6c06-0410-ace0-fbb531ad65f3
include/asterisk/channel.h
main/channel.c
main/channel_internal_api.c
res/res_stasis.c
res/stasis/app.c
res/stasis/app.h
res/stasis/stasis_bridge.c