mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
Merge "res_pjsip: Patch for res_pjsip_* module load/reload crash" into 13
This commit is contained in:
@@ -533,10 +533,14 @@ void ast_sip_session_unregister_sdp_handler(struct ast_sip_session_sdp_handler *
|
||||
* a module could reject an incoming request if desired.
|
||||
*
|
||||
* \param supplement The supplement to register
|
||||
* \param module Referenced module(NULL safe)
|
||||
* \retval 0 Success
|
||||
* \retval -1 Failure
|
||||
*/
|
||||
int ast_sip_session_register_supplement(struct ast_sip_session_supplement *supplement);
|
||||
int ast_sip_session_register_supplement_with_module(struct ast_module *module, struct ast_sip_session_supplement *supplement);
|
||||
|
||||
#define ast_sip_session_register_supplement(supplement) \
|
||||
ast_sip_session_register_supplement_with_module(ast_module_info->self, supplement)
|
||||
|
||||
/*!
|
||||
* \brief Unregister a an supplement to SIP session processing
|
||||
|
@@ -56,10 +56,11 @@ void internal_sip_session_register_supplement(struct ast_sip_session_supplement
|
||||
}
|
||||
}
|
||||
|
||||
int ast_sip_session_register_supplement(struct ast_sip_session_supplement *supplement)
|
||||
int ast_sip_session_register_supplement_with_module(struct ast_module *module, struct ast_sip_session_supplement *supplement)
|
||||
{
|
||||
internal_sip_session_register_supplement(supplement);
|
||||
internal_res_pjsip_ref();
|
||||
ast_module_shutdown_ref(module);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -118,3 +119,11 @@ int ast_sip_session_add_supplements(struct ast_sip_session *session)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* This stub is for ABI compatibility. */
|
||||
#undef ast_sip_session_register_supplement
|
||||
int ast_sip_session_register_supplement(struct ast_sip_session_supplement *supplement);
|
||||
int ast_sip_session_register_supplement(struct ast_sip_session_supplement *supplement)
|
||||
{
|
||||
return ast_sip_session_register_supplement_with_module(NULL, supplement);
|
||||
}
|
||||
|
Reference in New Issue
Block a user