Merge "res_pjsip_registrar: blocked threads on reliable transport shutdown take 3" into 16

This commit is contained in:
Joshua Colp
2019-03-05 07:15:40 -06:00
committed by Gerrit Code Review
3 changed files with 133 additions and 83 deletions

View File

@@ -3142,6 +3142,29 @@ enum ast_transport_monitor_reg {
enum ast_transport_monitor_reg ast_sip_transport_monitor_register(pjsip_transport *transport,
ast_transport_monitor_shutdown_cb cb, void *ao2_data);
/*!
* \brief Register a reliable transport shutdown monitor callback replacing any duplicate.
* \since 13.26.0
* \since 16.3.0
*
* \param transport Transport to monitor for shutdown.
* \param cb Who to call when transport is shutdown.
* \param ao2_data Data to pass with the callback.
* \param matches Matcher function that returns true if data matches a previously
* registered data object
*
* \note The data object passed will have its reference count automatically
* incremented by this call and automatically decremented after the callback
* runs or when the callback is unregistered.
*
* This function checks for duplicates, and overwrites/replaces the old monitor
* with the given one.
*
* \return enum ast_transport_monitor_reg
*/
enum ast_transport_monitor_reg ast_sip_transport_monitor_register_replace(pjsip_transport *transport,
ast_transport_monitor_shutdown_cb cb, void *ao2_data, ast_transport_monitor_data_matcher matches);
/*!
* \brief Unregister a reliable transport shutdown monitor
* \since 13.20.0