diff options
author | murf <murf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-03-02 05:21:36 +0000 |
---|---|---|
committer | murf <murf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-03-02 05:21:36 +0000 |
commit | a66694587279098204e580fdf5d9780490aaa2de (patch) | |
tree | 30e90ae172117b7f64f3c6c628cc669bcd458239 /pbx | |
parent | 8d6756ed96867bf2da070e6178960054db232d7b (diff) |
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/branches/1.4@57426 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 2905f01cf..6b787b8e0 100644 --- a/pbx/pbx_ael.c +++ b/pbx/pbx_ael.c @@ -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++; } } |