Latent bug in the new tradindexed code?

Russ Allbery rra at stanford.edu
Tue Oct 15 17:00:20 UTC 2002


Alex Kiernan <alexk at demon.net> writes:

> I'm trying to tidy up article.c - actually I started by trying to insert
> a message-id to storage token cache (which I already have in NEWNEWS),
> then discovered that I couldn't get the message id easily, then got lost
> in the spaghetti (and at one point started writing a new overview schema
> parser, then discovered Russ had beaten me to it:)

For overview schema parsing, note that my long-term intention is to add
the additional headers one wants in overview as a vector key in inn.conf.
In other words, eliminate overview.fmt entirely and have an inn.conf
setting like:

    overview: [ xref content-type keywords ]

or whatever you want, with xref as the default.  The overview parser in
libstorage is basically just a stop-gap until we can do that (and then
nnrpd will have to fake up a response to list overview.fmt).

I think that will be much less confusing, and it will eliminate the
possibility of configuring overview in a way that doesn't actually comply
with the NNTP standard.

> I'll assume I can rip bits out as needed.

article.c would look a lot nicer if the code to find headers in articles
was replaced with something that looked more like HeaderFindMem.  I was
playing with the idea of redoing the logic of both as a new function in
lib/wire.c, since at least nnrpd can assume that everything it sees is in
wire format (which makes things easier).

The trick is that you have to still handle path rewriting and xref
rewriting for virtual domains in article.c, but that would be easier done
as a little wrapper function around a call to a generic routine.

In general, I think that everything in INN that works on raw articles
should transform to wire format at the earliest opportunity if necessary,
and then all of our internal functions can be written expecting articles
in wire format.

(Oh, and the functions to transform to and from wire format should really
be moved into lib/wire.c from libstorage and get better wire_* names.)

-- 
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