Bug#533285: inn2: nnrpd crashes when retrieving entire thread

Russ Allbery rra at stanford.edu
Wed Jun 17 00:08:05 UTC 2009

Julien ÉLIE <julien at trigofacile.com> writes:

> Then it will imply that we do twice the work (two calls to
> overview_index()) because we already use the index number in
> HDR/XHDR/XPAT to decide whether to retrieve the article or to have a
> look inside the overview database.  If we do "HDR Message-ID 1-1000",
> it will call overview_index() 1000 times to see that "Message-ID" is a
> mandatory header, which was already known.  It is only useful when the
> header is not mandatory because its position could change between
> articles.

Hm, yes, that's a good point.

Here's another proposal: what if we split overview_getheader into two
functions, one that retrieves only mandatory headers and one that
retrieves only extra headers?  Then the first can take an index and the
second can take a header, and the second wouldn't ever bother to call
overview_index() and would just walk the extra headers.

If for other call sites we really want a simple function that does the
work of returning whichever type of header, we can always write it as a
wrapper around those two functions.

Russ Allbery (rra at stanford.edu)             <http://www.eyrie.org/~eagle/>

    Please send questions to the list rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.

More information about the inn-workers mailing list