[svn-commits] mvanbaak: branch group/appdocsxml r128336 - /team/group/appdocsxml/main/pbx.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sat Jul 5 18:32:52 CDT 2008


Author: mvanbaak
Date: Sat Jul  5 18:32:52 2008
New Revision: 128336

URL: http://svn.digium.com/view/asterisk?view=rev&rev=128336
Log:
- update to CODE_GUIDELINES
- make this compile under --dev-mode

Modified:
    team/group/appdocsxml/main/pbx.c

Modified: team/group/appdocsxml/main/pbx.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/main/pbx.c?view=diff&rev=128336&r1=128335&r2=128336
==============================================================================
--- team/group/appdocsxml/main/pbx.c (original)
+++ team/group/appdocsxml/main/pbx.c Sat Jul  5 18:32:52 2008
@@ -8157,6 +8157,11 @@
 int load_pbx(void)
 {
 	int x;
+#ifdef XML_DOCUMENTATION
+	struct ast_config *cfg = NULL;
+	struct ast_variable *var = NULL;
+	struct ast_flags cnfflags = { 0 };
+#endif
 
 	/* Initialize the PBX */
 	ast_verb(1, "Asterisk PBX Core Initializing\n");
@@ -8168,25 +8173,22 @@
 	ast_cli_register_multiple(pbx_cli, sizeof(pbx_cli) / sizeof(struct ast_cli_entry));
 	__ast_custom_function_register(&exception_function, NULL);
 
-	#ifdef XML_DOCUMENTATION
+#ifdef XML_DOCUMENTATION
 	snprintf(documentation_language, sizeof(documentation_language), "en");
-	struct ast_config *cfg = NULL;
-	struct ast_variable *var = NULL;
-	struct ast_flags cnfflags = { 0 };
-	if(!(cfg = ast_config_load("asterisk.conf", cnfflags))) {
+	if (!(cfg = ast_config_load("asterisk.conf", cnfflags))) {
 		ast_log(LOG_ERROR, "No asterisk.conf? That cannot be good.\n");
 	}
 	
-	for(var = ast_variable_browse(cfg, "options"); var; var = var->next) {
-		if(!strcasecmp(var->name, "documentation_language")) {
-			if(!ast_strlen_zero(var->value)) {
+	for (var = ast_variable_browse(cfg, "options"); var; var = var->next) {
+		if (!strcasecmp(var->name, "documentation_language")) {
+			if (!ast_strlen_zero(var->value)) {
 				snprintf(documentation_language, sizeof(documentation_language), "%s", var->value);
 			}
 		}	
 	}
 	/* Load Documentation XML Blob */
 	ast_load_documentation();
-	#endif
+#endif
 
 	/* Register builtin applications */
 	for (x = 0; x < sizeof(builtins) / sizeof(struct pbx_builtin); x++) {




More information about the svn-commits mailing list