[asterisk-commits] eliel: trunk r155204 - /trunk/main/pbx.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Nov 6 21:02:01 CST 2008


Author: eliel
Date: Thu Nov  6 21:02:01 2008
New Revision: 155204

URL: http://svn.digium.com/view/asterisk?view=rev&rev=155204
Log:
If 'asterisk.conf' is not found, instead of giving up,
load documentation for the 'en_US' language (fix my last
commit).

Modified:
    trunk/main/pbx.c

Modified: trunk/main/pbx.c
URL: http://svn.digium.com/view/asterisk/trunk/main/pbx.c?view=diff&rev=155204&r1=155203&r2=155204
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Thu Nov  6 21:02:01 2008
@@ -6546,19 +6546,16 @@
 	/* setup default XML documentation language */
 	snprintf(documentation_language, sizeof(documentation_language), default_documentation_language);
 
-	if (!(cfg = ast_config_load2("asterisk.conf", "" /* core can't reload */, cnfflags))) {
-		ast_log(LOG_ERROR, "No asterisk.conf? That cannot be good.\n");
-		return 1;
-	}
-
-	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);
-			}
-		}
-	}
-        ast_config_destroy(cfg);
+	if ((cfg = ast_config_load2("asterisk.conf", "" /* core can't reload */, cnfflags))) {
+		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);
+				}
+			}
+		}
+		ast_config_destroy(cfg);
+	}
 
 	/* initialize the XML library. */
 	ast_xml_init();




More information about the asterisk-commits mailing list