mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-15 08:44:14 +00:00
I almost had comma escapes right, but 9184 points out the problem-- the escape is removed by pbx_config, and pbx_ael should also, before sending it down into the pbx engine. Also, you have to insert it back in, if you are generating extensions.conf code from the AEL.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@57426 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -151,11 +151,19 @@ static void substitute_commas(char *str);
|
||||
static void substitute_commas(char *str)
|
||||
{
|
||||
char *p = str;
|
||||
|
||||
while (p && *p)
|
||||
{
|
||||
if (*p == ',' && ((p != str && *(p-1) != '\\')
|
||||
|| p == str))
|
||||
*p = '|';
|
||||
if (*p == '\\' && *(p+1) == ',') { /* learning experience: the '\,' is turned into just ',' by pbx_config; So we need to do the same */
|
||||
char *q = p;
|
||||
while (*q) { /* move the ',' and everything after it up 1 char */
|
||||
*q = *(q+1);
|
||||
q++;
|
||||
}
|
||||
}
|
||||
p++;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user