[INN-COMMITTERS] inn/innd (art.c innd.h nc.c)

Russ Allbery Russ_Allbery at isc.org
Fri May 21 08:45:51 UTC 2004


    Date: Friday, May 21, 2004 @ 08:45:51
  Author: rra
    Path: /proj/cvs/isc/inn/inn/innd

Modified: art.c innd.h nc.c

Completely rewrite ARTparse.  Break it up into several separate functions,
with a function for parsing the headers, a separate one for parsing the
body, and a wrapper that also checks the article size after an invocation
of either and handles writing error messages to the logs if necessary.

Simplify the logic of ARTparse considerably by observing that if there are
fewer than five characters left to look at, we can't be looking at the end
of the article even if we're looking at a \r and we can just return and
wait for more data.  This lets us use lookahead when we see a \r without
complicated logic to keep from looking past the end of the article, and
eliminates the need for LastTerminator and LastCR.

Remove the #define of EXECUTE_BITS, which wasn't used.  Simplify the
determination of the feeding site for logging article rejections.  Move the
additional steps required for large articles (an additional syslog notice
and a history file entry) out of nc.c into art.c under ARTparse, allowing
considerable simplification of the CSgetheader case in NCproc.


--------+
 art.c  |  466 ++++++++++++++++++++++++++++++---------------------------------
 innd.h |   10 -
 nc.c   |   35 ----
 3 files changed, 230 insertions(+), 281 deletions(-)


More information about the inn-committers mailing list