Index: pbx_spool.c =================================================================== RCS file: /usr/cvsroot/asterisk/pbx/pbx_spool.c,v retrieving revision 1.8 diff -u -r1.8 pbx_spool.c --- pbx_spool.c 31 Mar 2004 08:00:26 -0000 1.8 +++ pbx_spool.c 5 Apr 2004 14:01:39 -0000 @@ -97,9 +97,15 @@ lineno++; if (!feof(f)) { /* Trim comments */ - c = strchr(buf, '#'); - if (c) + 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';