mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 02:26:23 +00:00
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
This commit is contained in:
@@ -97,9 +97,13 @@ static int apply_outgoing(struct outgoing *o, char *fn, FILE *f)
|
|||||||
lineno++;
|
lineno++;
|
||||||
if (!feof(f)) {
|
if (!feof(f)) {
|
||||||
/* Trim comments */
|
/* Trim comments */
|
||||||
c = strchr(buf, '#');
|
c = buf;
|
||||||
if (c)
|
while ((c = strchr(c, '#'))) {
|
||||||
*c = '\0';
|
if ((c == buf) || (*(c-1) == ' ') || (*(c-1) == '\t'))
|
||||||
|
*c = '\0';
|
||||||
|
else
|
||||||
|
c++;
|
||||||
|
}
|
||||||
c = strchr(buf, ';');
|
c = strchr(buf, ';');
|
||||||
if (c)
|
if (c)
|
||||||
*c = '\0';
|
*c = '\0';
|
||||||
|
Reference in New Issue
Block a user