diff options
author | murf <murf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-03-02 05:57:06 +0000 |
---|---|---|
committer | murf <murf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-03-02 05:57:06 +0000 |
commit | 40b2713d84d4d3681fdbdd0e3f9a1cbd12749e6b (patch) | |
tree | 42adf1ec1ef0e2d5f615497ded78f341363f2e44 /pbx | |
parent | d2b807bfa42e1f0ade785b241fdf3ac3b392e5d4 (diff) |
Merged revisions 57426 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r57426 | murf | 2007-03-01 22:21:36 -0700 (Thu, 01 Mar 2007) | 1 line
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: http://svn.digium.com/svn/asterisk/trunk@57438 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx')
-rw-r--r-- | pbx/pbx_ael.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pbx/pbx_ael.c b/pbx/pbx_ael.c index 364c185da..66a37dc32 100644 --- a/pbx/pbx_ael.c +++ b/pbx/pbx_ael.c @@ -155,11 +155,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++; } } |