res_pjsip_keepalive: Don't crash if PJSIP module is not loaded.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431555 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Joshua Colp
2015-02-04 01:27:04 +00:00
parent 2f2eb1931a
commit 18c8c1bae3

View File

@@ -240,6 +240,8 @@ static struct ast_sorcery_observer keepalive_global_observer = {
static int load_module(void)
{
CHECK_PJSIP_MODULE_LOADED();
ast_sorcery_observer_add(ast_sip_get_sorcery(), "global", &keepalive_global_observer);
ast_sorcery_reload_object(ast_sip_get_sorcery(), "global");
ast_module_ref(ast_module_info->self);