OVgetartinfo and tradindexed

Russ Allbery rra at stanford.edu
Sun Feb 24 04:55:25 UTC 2002


Calling OVgetartinfo with a non-NULL data pointer just completely doesn't
work with tradindexed right now.  The value of the data pointer that it
returns comes from an overview search that's closed before
tradindexed_getartinfo returns, so it's returning a pointer into a locally
allocated data structure that no longer exists.

We haven't found this before because nowhere in INN is OVgetartinfo() ever
called with a non-NULL data pointer; the function is currently only used
to check the existence of articles and obtain their tokens.  ovdb appears
to implement this in a fashion that will work; I'm not sure if buffindexed
does or not (but it looks like it may not, because it does the same thing
that tradindexed does, namely close the search before returning).

I can implement something for tradindexed so that this will work, although
it's going to either be ugly (using static variables) or involve a
different API change so that the caller supplies a buffer.  But since we
don't seem to be using this part of the function, I'd rather just drop the
data and len arguments in the OVgetartinfo signature and have that
function only return the token.  Seems like simplicity is better.

Does that sound okay to everyone?  OVgetartinfo isn't actually faster than
OVopensearch/OVsearch for buffindexed and tradindexed (I'm not as sure for
ovdb; I don't know that code as well), so there's no reason to retain it
except to provide a simplified interface for retrieving full overview
information for a single article, not a very common operation.

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


More information about the inn-workers mailing list