res_pjsip: Patch for res_pjsip_* module load/reload crash

The session_supplements for the pjsip makes crashes when the module
load/unload.

ASTERISK-28157

Change-Id: I5b82be3a75d702cf1933d8d1417f44aa10ad1029
This commit is contained in:
Corey Farrell
2018-11-27 11:20:59 -05:00
parent 9f0459d2a0
commit ec02d7fd4c
2 changed files with 15 additions and 2 deletions

View File

@@ -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