* 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
}
}
-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;
}
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);
+}