aboutsummaryrefslogtreecommitdiffstats
path: root/pbx
diff options
context:
space:
mode:
authorcitats <citats@f38db490-d61c-443f-a65b-d21fe96a405b>2004-04-05 18:03:40 +0000
committercitats <citats@f38db490-d61c-443f-a65b-d21fe96a405b>2004-04-05 18:03:40 +0000
commitbeea36af83384b010b415d1a86e967403754a9eb (patch)
tree6d413d73c56ada1275e0ca1f08ef2b2b3874220b /pbx
parentaed541d3985379d3af6a737fbac8e4698852303c (diff)
Make outgoing call spool only consider # a comment if at the beginning of a line or following whitespace (bug 1346)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2625 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx')
-rwxr-xr-xpbx/pbx_spool.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/pbx/pbx_spool.c b/pbx/pbx_spool.c
index 946f369c3..1dbee19db 100755
--- a/pbx/pbx_spool.c
+++ b/pbx/pbx_spool.c
@@ -97,9 +97,13 @@ static int apply_outgoing(struct outgoing *o, char *fn, FILE *f)
lineno++;
if (!feof(f)) {
/* Trim comments */
- c = strchr(buf, '#');
- if (c)
- *c = '\0';
+ c = buf;
+ while ((c = strchr(c, '#'))) {
+ if ((c == buf) || (*(c-1) == ' ') || (*(c-1) == '\t'))
+ *c = '\0';
+ else
+ c++;
+ }
c = strchr(buf, ';');
if (c)
*c = '\0';