diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-12-27 06:42:29 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-12-27 06:42:29 +0000 |
commit | 3472d69fa7dcce4707c3a49ad86506d76c167552 (patch) | |
tree | 53ef7247988ad592be25adf343e977680369e6bb /config.c | |
parent | 8d6c048c863c339896931fe09d3c41c745971738 (diff) |
Bug 5854 - Allow quotation of the second field in extconfig, for the purpose of including commas (for LDAP configuration)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7647 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -811,9 +811,19 @@ void read_config_maps(void) for (v = ast_variable_browse(config, "settings"); v; v = v->next) { stringp = v->value; driver = strsep(&stringp, ","); - database = strsep(&stringp, ","); + + /* check if the database text starts with a double quote */ + if (*stringp == '"') { + stringp++; + database = strsep(&stringp, "\""); + strsep(&stringp, ","); + } else { + /* apparently this text has no quotes */ + database = strsep(&stringp, ","); + } + table = strsep(&stringp, ","); - + if (!strcmp(v->name, extconfig_conf)) { ast_log(LOG_WARNING, "Cannot bind '%s'!\n", extconfig_conf); continue; |