diff options
author | Matt Jordan <mjordan@digium.com> | 2015-05-24 13:56:20 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2015-05-24 13:56:20 -0500 |
commit | e1a64e021b3d8ee7eb4519beb3739b395479b540 (patch) | |
tree | 0a6fcfba29ba629836d77351267376d6f0ca22f1 /include | |
parent | 0af91f5f22bba28255a87f5081f161f02ee4b219 (diff) | |
parent | 50044fdc15197b3a4a742827c97fc25daddc98aa (diff) |
Merge "Stasis: Fix unsafe use of stasis_unsubscribe in modules."
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/stasis.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/asterisk/stasis.h b/include/asterisk/stasis.h index aa681e13e..69b2d0f22 100644 --- a/include/asterisk/stasis.h +++ b/include/asterisk/stasis.h @@ -511,6 +511,17 @@ void stasis_publish_sync(struct stasis_subscription *sub, struct stasis_message typedef void (*stasis_subscription_cb)(void *data, struct stasis_subscription *sub, struct stasis_message *message); /*! + * \brief Stasis subscription callback function that does nothing. + * + * \note This callback should be used for events are not directly processed, but need + * to be generated so data can be retrieved from cache later. Subscriptions with this + * callback can be released with \ref stasis_unsubscribe, even during module unload. + * + * \since 13.5 + */ +void stasis_subscription_cb_noop(void *data, struct stasis_subscription *sub, struct stasis_message *message); + +/*! * \brief Create a subscription. * * In addition to being AO2 managed memory (requiring an ao2_cleanup() to free |