[asterisk-commits] kharwell: branch 12 r407442 - /branches/12/res/res_pjsip/config_global.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Feb 5 13:41:52 CST 2014


Author: kharwell
Date: Wed Feb  5 13:41:48 2014
New Revision: 407442

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=407442
Log:
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


Modified:
    branches/12/res/res_pjsip/config_global.c

Modified: branches/12/res/res_pjsip/config_global.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/res_pjsip/config_global.c?view=diff&rev=407442&r1=407441&r2=407442
==============================================================================
--- branches/12/res/res_pjsip/config_global.c (original)
+++ branches/12/res/res_pjsip/config_global.c Wed Feb  5 13:41:48 2014
@@ -105,7 +105,7 @@
 	struct global_config *cfg = get_global_cfg();
 
 	if (!cfg) {
-		return 0;
+		return ast_strdup("no");
 	}
 
 	res = ast_strdup(cfg->debug);




More information about the asterisk-commits mailing list