[asterisk-commits] file: branch 1.4 r50405 - /branches/1.4/main/config.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Jan 10 12:46:29 MST 2007


Author: file
Date: Wed Jan 10 13:46:29 2007
New Revision: 50405

URL: http://svn.digium.com/view/asterisk?view=rev&rev=50405
Log:
Fix parsing when using something like ldap settings. (done by anthonyl)

Modified:
    branches/1.4/main/config.c

Modified: branches/1.4/main/config.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/config.c?view=diff&rev=50405&r1=50404&r2=50405
==============================================================================
--- branches/1.4/main/config.c (original)
+++ branches/1.4/main/config.c Wed Jan 10 13:46:29 2007
@@ -1103,7 +1103,7 @@
 {
 	struct ast_config *config, *configtmp;
 	struct ast_variable *v;
-	char *driver, *table, *database, *stringp;
+	char *driver, *table, *database, *stringp, *tmp;
 
 	clear_config_maps();
 
@@ -1118,6 +1118,9 @@
 	for (v = ast_variable_browse(config, "settings"); v; v = v->next) {
 		stringp = v->value;
 		driver = strsep(&stringp, ",");
+
+		if ((tmp = strchr(stringp, '\"')))
+			stringp = tmp;
 
 		/* check if the database text starts with a double quote */
 		if (*stringp == '"') {



More information about the asterisk-commits mailing list