]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Stasis: Fix unsafe use of stasis_unsubscribe in modules. 26/526/1
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 02:58:32 +0000 (22:58 -0400)
commit0d266cbe025e30ce18121f43dbb6b11620b4d5e1
tree3f215665d20602915427b42768fbcbdc1af47e67
parenteaabc4d04c9c4ebca1a4d04b5e9e6a36cc0b764b
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