httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Kraemer <Martin.Krae...@mch.sni.de>
Subject [PATCH] Line Numbers are counted wrong in config file parsing
Date Wed, 22 Oct 1997 10:17:32 GMT
I always wondered why the line numbers printed in error messages for
config file errors were often too low. (Syntax error on line ...)

Now I dug into the code and noted that the line counter is only
incremented in handle_directive(), but not in cfg_getline(); some lines
(notably those skipped by <IfModule>) don't go thru handle_directive()
and are therefore not counted.

The best solution IMHO would be to add the line counting to cfg_getline()
where the '\n' is detected, but that would have required an interface
change. The following patch counts the lines in the calling functions.

    Martin
-- 
| S I E M E N S |  <Martin.Kraemer@mch.sni.de>  |      Siemens Nixdorf
| ------------- |   Voice: +49-89-636-46021     |  Informationssysteme AG
| N I X D O R F |   FAX:   +49-89-636-44994     |   81730 Munich, Germany
~~~~~~~~~~~~~~~~My opinions only, of course; pgp key available on request

Mime
View raw message