]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix crash for sorcery misconfigs
authorDavid M. Lee <dlee@digium.com>
Fri, 12 Dec 2014 15:03:16 +0000 (15:03 +0000)
committerDavid M. Lee <dlee@digium.com>
Fri, 12 Dec 2014 15:03:16 +0000 (15:03 +0000)
res_pjsip_outbound_publish was missing the CHECK_PJSIP_MODULE_LOADED()
call in load_module, and would crash with a segfault if res_pjsip
declined to load.

Review: https://reviewboard.asterisk.org/r/4258/
........

Merged revisions 429457 from http://svn.asterisk.org/svn/asterisk/branches/13

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@429458 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_pjsip_outbound_publish.c

index 323324d60c6a98b4c686e112092fc243238ec451..c79e42847711a2bf7e20690b043e664df7797aeb 100644 (file)
@@ -1087,6 +1087,8 @@ static int outbound_auth_handler(const struct aco_option *opt, struct ast_variab
 
 static int load_module(void)
 {
+       CHECK_PJSIP_MODULE_LOADED();
+
        ast_sorcery_apply_config(ast_sip_get_sorcery(), "res_pjsip_outbound_publish");
        ast_sorcery_apply_default(ast_sip_get_sorcery(), "outbound-publish", "config", "pjsip.conf,criteria=type=outbound-publish");