asterisk/channels
David M. Lee b97c71bb11 Fix shutdown assertions in stasis-core
In r388005, macros were introduced to consistently define message
types. This added an assert if a message type was used either before
it was initialized or after it had been cleaned up. It turns out that
this assertion fires during shutdown.

This actually exposed a hidden shutdown ordering problem. Since
unsubscribing is asynchronous, it's possible that the message types
used by the subscription could be freed before the final message of
the subscription was processed.

This patch adds stasis_subscription_join(), which blocks until the
last message has been processed by the subscription. Since joining was
most commonly done right after an unsubscribe, a
stasis_unsubscribe_and_join() convenience function was also added.

Similar functions were also added to the stasis_caching_topic and
stasis_message_router, since they wrap subscriptions and have similar
problems.

Other code in trunk was refactored to join() where appropriate, or at
least verify that the subscription was complete before being
destroyed.

Review: https://reviewboard.asterisk.org/r/2540


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389011 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-17 21:10:32 +00:00
..
h323 Asterisk media architecture conversion - no more format bitfields 2011-02-03 16:22:10 +00:00
iax2 chan_iax2: Fix compile error if MALLOC_DEBUG enabled. 2013-02-01 19:35:26 +00:00
misdn Allow mISDN to send PROGRESS messsage. 2013-05-10 22:12:52 +00:00
sip Stasis: Update security events to use Stasis 2013-05-17 17:36:10 +00:00
chan_agent.c chan_agent: Prevent multiple channels from logging in as the same agent. 2013-01-29 18:02:07 +00:00
chan_alsa.c Don't attempt to create a voice frame on a read error 2013-04-14 02:35:04 +00:00
chan_bridge.c confbridge: Minor fixes playing user counts to the conference. 2013-01-22 00:36:52 +00:00
chan_console.c Doxygen Updates - Title update 2012-10-14 21:47:40 +00:00
chan_dahdi.c Make a log NOTICE more explicit that the event comes from DAHDI and not PRI. 2013-05-06 17:09:50 +00:00
chan_gtalk.c Doxygen Updates - Title update 2012-10-14 21:47:40 +00:00
chan_gulp.c chan_gulp: Minor readability Improvements to chan_gulp 2013-05-13 17:20:33 +00:00
chan_h323.c Doxygen Updates - Title update 2012-10-14 21:47:40 +00:00
chan_iax2.c Fix shutdown assertions in stasis-core 2013-05-17 21:10:32 +00:00
chan_jingle.c Set the sin_family on the bind address socket during initialization 2013-02-24 23:01:17 +00:00
chan_local.c Simplify chan_local.c:manager_optimize_away() using ao2_find(). 2013-05-01 21:55:53 +00:00
chan_mgcp.c Remove some unnecessary calls to ast_bridged_channel() in chan_mgcp.c 2013-05-01 20:01:27 +00:00
chan_misdn.c chan_misdn: Fix compile error. 2013-01-16 17:49:52 +00:00
chan_motif.c Add The Status Of A Module To The Output Of "CLI> module show" 2013-02-19 17:17:10 +00:00
chan_multicast_rtp.c Opaquification for ast_format structs in struct ast_channel 2012-02-24 00:32:20 +00:00
chan_nbs.c Opaquification for ast_format structs in struct ast_channel 2012-02-24 00:32:20 +00:00
chan_oss.c Doxygen Updates - Title update 2012-10-14 21:47:40 +00:00
chan_phone.c Doxygen Updates - Title update 2012-10-14 21:47:40 +00:00
chan_phone.h rename DialTone.h to chan_phone.h because chan_phone.c is the only file using it 2008-05-28 20:00:21 +00:00
chan_sip.c Fix shutdown assertions in stasis-core 2013-05-17 21:10:32 +00:00
chan_skinny.c Remove some unnecessary calls to ast_bridged_channel() in chan_skinny.c 2013-05-01 20:01:10 +00:00
chan_unistim.c Remove some unnecessary calls to ast_bridged_channel() in chan_unistim.c 2013-05-01 20:01:43 +00:00
chan_vpb.cc Doxygen Updates - Title update 2012-10-14 21:47:40 +00:00
console_board.c Multiple revisions 369001-369002 2012-06-15 16:20:16 +00:00
console_gui.c Multiple revisions 369001-369002 2012-06-15 16:20:16 +00:00
console_video.c Multiple revisions 369001-369002 2012-06-15 16:20:16 +00:00
console_video.h implement the 'freeze' function for incoming frames; 2008-06-30 15:45:15 +00:00
Makefile Merge the pimp_my_sip branch into trunk. 2013-04-25 18:25:31 +00:00
misdn_config.c Add named callgroups/pickupgroups 2012-08-07 12:46:36 +00:00
sig_analog.c Remove some unnecessary calls to ast_bridged_channel() in chan_dahdi.c/sig_analog.c 2013-05-01 20:00:31 +00:00
sig_analog.h Convert sig_analog to use a global callback table. 2012-08-08 20:32:53 +00:00
sig_pri.c chan_dahdi: Add inband_on_proceeding compatibility option. 2013-04-03 20:20:09 +00:00
sig_pri.h chan_dahdi: Add inband_on_proceeding compatibility option. 2013-04-03 20:20:09 +00:00
sig_ss7.c chan_dahdi/SS7: Made reject incoming call for an in-alarm or blocked channel. 2012-11-08 21:12:35 +00:00
sig_ss7.h Convert sig_ss7 to use a global callback table. 2012-08-08 00:15:54 +00:00
vcodecs.c Multiple revisions 369001-369002 2012-06-15 16:20:16 +00:00
vgrabbers.c Multiple revisions 369001-369002 2012-06-15 16:20:16 +00:00