Make outgoing call spool only consider # a comment if at the beginning of a line or following whitespace (bug 1346)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2625 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.0
James Golovich 21 years ago
parent 09e0fc2074
commit dc383a7ee7

@ -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';

Loading…
Cancel
Save