[asterisk-dev] [Code Review] 4213: Stasis: Fix StasisStart and StasisEnd ordering and missing events

opticron reviewboard at asterisk.org
Tue Dec 2 13:34:26 CST 2014

This is an automatically generated e-mail. To reply, visit:

(Updated Dec. 2, 2014, 1:34 p.m.)

Review request for Asterisk Developers and Mark Michelson.


Update description and address Matt's comments with some simplification of the patch.

Bugs: ASTERISK-24537

Repository: Asterisk

Description (updated)

This corrects several bugs that currently exist in the 12/13/trunk 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

Diffs (updated)

  branches/12/res/stasis/stasis_bridge.c 428504 
  branches/12/res/stasis/app.c 428504 
  branches/12/res/stasis/app.h 428504 
  branches/12/res/res_stasis.c 428504 
  branches/12/main/channel_internal_api.c 428504 
  branches/12/main/channel.c 428504 
  branches/12/include/asterisk/channel.h 428504 

Diff: https://reviewboard.asterisk.org/r/4213/diff/


Ran existing ARI tests and a few new ones that are in-progress along with the scenarios that originally found these issues.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20141202/81aae560/attachment.html>

More information about the asterisk-dev mailing list