summaryrefslogtreecommitdiff
path: root/pbx
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2005-10-11 20:52:37 +0000
committerRussell Bryant <russell@russellbryant.com>2005-10-11 20:52:37 +0000
commit460655f31ca1bec2d6ad52fd82379fa24bc7efa4 (patch)
treec2aca58de7275156e079c82309c246d3c13b1dc7 /pbx
parent1ae71d0b410c29eb70edb3ce21d5caccd942782e (diff)
allow semicolons to be escaped in call files (issue #5407)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6742 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'pbx')
-rwxr-xr-xpbx/pbx_spool.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/pbx/pbx_spool.c b/pbx/pbx_spool.c
index a3c8cdac6..bcb780deb 100755
--- a/pbx/pbx_spool.c
+++ b/pbx/pbx_spool.c
@@ -129,9 +129,17 @@ static int apply_outgoing(struct outgoing *o, char *fn, FILE *f)
else
c++;
}
- c = strchr(buf, ';');
- if (c)
- *c = '\0';
+
+ c = buf;
+ while ((c = strchr(c, ';'))) {
+ if ((c > buf) && (c[-1] == '\\')) {
+ memmove(c - 1, c, strlen(c) + 1);
+ c++;
+ } else {
+ *c = '\0';
+ break;
+ }
+ }
/* Trim trailing white space */
while(!ast_strlen_zero(buf) && buf[strlen(buf) - 1] < 33)