res_pjsip_refer: Prevent unload except during shutdown.
authorCorey Farrell <git@cfware.com>
Wed, 18 Oct 2017 18:37:57 +0000 (14:37 -0400)
committerCorey Farrell <git@cfware.com>
Wed, 18 Oct 2017 18:37:57 +0000 (14:37 -0400)
Prevent unload of the module as certain pjsip initialization functions
cannot be reversed.

ASTERISK-24483

Change-Id: I94597ec8b8491f5af9c57bf66dbc3b078fe2d49d

res/res_pjsip_refer.c

index 456e09d..62f8b67 100644 (file)
@@ -1211,6 +1211,8 @@ static int load_module(void)
        ast_sip_register_service(&refer_progress_module);
        ast_sip_session_register_supplement(&refer_supplement);
 
+       ast_module_shutdown_ref(ast_module_info->self);
+
        return AST_MODULE_LOAD_SUCCESS;
 }