From: Kevin Harwell Date: Wed, 5 Feb 2014 19:42:51 +0000 (+0000) Subject: res_pjsip: When no global type the debug option defaults to "yes" X-Git-Tag: 13.0.0-beta1~571 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99f8f0f80afe2bb0e4d9e1cb9590a111afedfb9f;p=thirdparty%2Fasterisk.git res_pjsip: When no global type the debug option defaults to "yes" If the global section was not specified in pjsip.conf then the configuration object does not exist in sorcery so when retrieving "debug" option it would return NULL. Then the NULL result was passed to ast_false utils function which would return false because it wasn't set to some representation of false, thus enabling sip debug logging. Made it so if the global config object does not exist then it will return a default of "no" for sip debugging. (issue ASTERISK-23038) Reported by: Rusty Newton ........ Merged revisions 407442 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407443 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/res_pjsip/config_global.c b/res/res_pjsip/config_global.c index 0f4350d809..739a2339ff 100644 --- a/res/res_pjsip/config_global.c +++ b/res/res_pjsip/config_global.c @@ -105,7 +105,7 @@ char *ast_sip_get_debug(void) struct global_config *cfg = get_global_cfg(); if (!cfg) { - return 0; + return ast_strdup("no"); } res = ast_strdup(cfg->debug);