Stasis: Fix unsafe use of stasis_unsubscribe in modules.
authorCorey Farrell <git@cfware.com>
Sat, 23 May 2015 02:50:43 +0000 (22:50 -0400)
committerCorey Farrell <git@cfware.com>
Sat, 23 May 2015 03:30:22 +0000 (22:30 -0500)
commit50044fdc15197b3a4a742827c97fc25daddc98aa
tree562e2b031fecf6cd7c5830410fd0eee0fed9a322
parentf66c41e668429b9a07dfdf30832c02ddc223f4a4
Stasis: Fix unsafe use of stasis_unsubscribe in modules.

Many uses of stasis_unsubscribe in modules can be reached through unload.
These have been switched to stasis_unsubscribe_and_join.

Some subscription callbacks do nothing, for these I've created a noop
callback function in stasis.c.  This is used by some modules that monitor
MWI topics in order to enable cache, since the callback does not become
invalid after dlclose it is safe to use stasis_unsubscribe on these, even
during module unload.

ASTERISK-25121 #close

Change-Id: Ifc2549fbd8eef7d703c222978e8f452e2972189c
13 files changed:
channels/chan_dahdi.c
channels/chan_iax2.c
channels/chan_mgcp.c
channels/chan_sip.c
channels/chan_skinny.c
channels/sig_pri.c
include/asterisk/stasis.h
main/stasis.c
res/res_hep_rtcp.c
res/res_pjsip_mwi.c
res/res_security_log.c
res/res_stasis_device_state.c
res/res_xmpp.c