diff options
author | Corey Farrell <git@cfware.com> | 2015-05-22 22:50:43 -0400 |
---|---|---|
committer | Corey Farrell <git@cfware.com> | 2015-05-22 22:58:32 -0400 |
commit | 0d266cbe025e30ce18121f43dbb6b11620b4d5e1 (patch) | |
tree | 3f215665d20602915427b42768fbcbdc1af47e67 /channels/sig_pri.c | |
parent | eaabc4d04c9c4ebca1a4d04b5e9e6a36cc0b764b (diff) |
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
Diffstat (limited to 'channels/sig_pri.c')
-rw-r--r-- | channels/sig_pri.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/sig_pri.c b/channels/sig_pri.c index 2815dac13..4b9139101 100644 --- a/channels/sig_pri.c +++ b/channels/sig_pri.c @@ -8991,7 +8991,7 @@ void sig_pri_stop_pri(struct sig_pri_span *pri) #if defined(HAVE_PRI_MWI) for (idx = 0; idx < ARRAY_LEN(pri->mbox); ++idx) { if (pri->mbox[idx].sub) { - pri->mbox[idx].sub = stasis_unsubscribe(pri->mbox[idx].sub); + pri->mbox[idx].sub = stasis_unsubscribe_and_join(pri->mbox[idx].sub); } } #endif /* defined(HAVE_PRI_MWI) */ |