summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Harwell <kharwell@digium.com>2014-02-05 19:42:51 +0000
committerKevin Harwell <kharwell@digium.com>2014-02-05 19:42:51 +0000
commit99f8f0f80afe2bb0e4d9e1cb9590a111afedfb9f (patch)
tree53c326f5518ff637ad2d8e21bc84afc3b0e65ae0
parenta610bfa9e8341bebfb44d656458c97189bdf701d (diff)
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
-rw-r--r--res/res_pjsip/config_global.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_pjsip/config_global.c b/res/res_pjsip/config_global.c
index 0f4350d80..739a2339f 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);