mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-08 19:08:14 +00:00
Bug 5854 - Allow quotation of the second field in extconfig, for the purpose of including commas (for LDAP configuration)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7647 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
14
config.c
14
config.c
@@ -811,9 +811,19 @@ void read_config_maps(void)
|
|||||||
for (v = ast_variable_browse(config, "settings"); v; v = v->next) {
|
for (v = ast_variable_browse(config, "settings"); v; v = v->next) {
|
||||||
stringp = v->value;
|
stringp = v->value;
|
||||||
driver = strsep(&stringp, ",");
|
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, ",");
|
table = strsep(&stringp, ",");
|
||||||
|
|
||||||
if (!strcmp(v->name, extconfig_conf)) {
|
if (!strcmp(v->name, extconfig_conf)) {
|
||||||
ast_log(LOG_WARNING, "Cannot bind '%s'!\n", extconfig_conf);
|
ast_log(LOG_WARNING, "Cannot bind '%s'!\n", extconfig_conf);
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -40,6 +40,8 @@
|
|||||||
; the family if the table is not specified
|
; the family if the table is not specified
|
||||||
;
|
;
|
||||||
;example => odbc,asterisk,alttable
|
;example => odbc,asterisk,alttable
|
||||||
|
;example2 => ldap,"dc=oxymium,dc=net",example2
|
||||||
|
;
|
||||||
;iaxusers => odbc,asterisk
|
;iaxusers => odbc,asterisk
|
||||||
;iaxpeers => odbc,asterisk
|
;iaxpeers => odbc,asterisk
|
||||||
;sipusers => odbc,asterisk
|
;sipusers => odbc,asterisk
|
||||||
|
|||||||
Reference in New Issue
Block a user