res_pjsip: Add REF_DEBUG info to module references.

This provides better information to REF_DEBUG log for troubleshooting
when the system is unable to unload res_pjsip.so during shutdown due to
module references.

ASTERISK-27306

Change-Id: I63197ad33d1aebe60d12e0a6561718bdc54e4612
This commit is contained in:
Corey Farrell
2017-10-04 11:59:49 -04:00
parent 7d04544986
commit 65399a5eda
6 changed files with 48 additions and 40 deletions

View File

@@ -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(struct ast_sip_session_supplement *supplement,
const char *file, int line, const char *func)
{
internal_sip_session_register_supplement(supplement);
ast_module_ref(AST_MODULE_SELF);
__ast_module_ref(AST_MODULE_SELF, file, line, func);
return 0;
}
@@ -82,10 +83,11 @@ int internal_sip_session_unregister_supplement(struct ast_sip_session_supplement
return res;
}
void ast_sip_session_unregister_supplement(struct ast_sip_session_supplement *supplement)
void __ast_sip_session_unregister_supplement(struct ast_sip_session_supplement *supplement,
const char *file, int line, const char *func)
{
if (!internal_sip_session_unregister_supplement(supplement)) {
ast_module_unref(AST_MODULE_SELF);
__ast_module_unref(AST_MODULE_SELF, file, line, func);
}
}