summaryrefslogtreecommitdiff
path: root/include/asterisk/channel.h
diff options
context:
space:
mode:
authorKinsey Moore <kmoore@digium.com>2014-12-08 15:45:46 +0000
committerKinsey Moore <kmoore@digium.com>2014-12-08 15:45:46 +0000
commit4bb556a8478741dc81361327d3a50a8809be09f6 (patch)
tree792c883b590f06389a70e288138ad42a3e146ac6 /include/asterisk/channel.h
parent49aa87e17cd1959d79672807697813009cf6da75 (diff)
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 ........ Merged revisions 429061 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 429062 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@429063 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/channel.h')
-rw-r--r--include/asterisk/channel.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h
index 96b34ad4a..45e94ce29 100644
--- a/include/asterisk/channel.h
+++ b/include/asterisk/channel.h
@@ -2465,6 +2465,17 @@ void ast_channel_internal_copy_linkedid(struct ast_channel *dest, struct ast_cha
void ast_channel_internal_swap_uniqueid_and_linkedid(struct ast_channel *a, struct ast_channel *b);
/*!
+ * \brief Swap topics beteween two channels
+ * \param a First channel
+ * \param b Second channel
+ * \return void
+ *
+ * \note
+ * This is used in masquerade to exchange topics for message routing
+ */
+void ast_channel_internal_swap_topics(struct ast_channel *a, struct ast_channel *b);
+
+/*!
* \brief Set uniqueid and linkedid string value only (not time)
* \param chan The channel to set the uniqueid to
* \param uniqueid The uniqueid to set