nntp_read_line bug?

Forrest J. Cavalier III mibsoft at epix.net
Fri Oct 24 15:05:10 UTC 2003


Seems to me (by experimentation) that nntp.c::nntp_read_line()
does not compact the buffer often enough.  

I am seeing NNTP_READ_LONG even when reading lots
of short lines (like from the active file.)  If the input
were actually an NNTP stream, I expect it would be worse,
but I have not fully wrapped my head into this code.

I don't know if a fix should be better made in nntp_read_data()
or nntp_read_line(), or maybe one of the buffer routines.

So, what is the API designed to guarantee with respect to
*line values obtained by previous calls to nntp_read_line()?
 Aren't all those previously returned pointers considered stale
after any call to a nntp_ routine?

If that is true, then the buffer compacting should be done always
when within 1024 bytes of the end of the buffer, right?  If not,
how is nntp_read_line() supposed to avoid the problem?






More information about the inn-workers mailing list