memory access woes in bogofilter or db-4.0.14?

Matthias Andree matthias.andree at gmx.de
Wed Jan 8 17:34:06 CET 2003


David Relson <relson at osagesoftware.com> writes:

> There are two functions and there's a reason for it.
>
> Generally speaking, the timestamps exist for wordlist maintenance.  User
> code that updates the wordlists doesn't need to know that they exist.
> The timestamps should be handled automagically.  That's why
> db_setvalue(token,value) exists and why register_words() uses it.
> db_setvalue() fills in the dbv_t struct using the value it's given and
> the current timestamp (stored in "today") and calls the low level
> function db_set_dbvalue().

Well, my point is: my data base now only has the value in its data, but
there is no key that stores if the data base is in "with-timestamp" or
"without-timestamp" format. If I start using timestamps now, I have tons
of entries with their timestamp == 0, how's bogofilter treating that?
The date has never been stored, what date do you then assume for the
token? "new" i. e. "today and now"?

> This is why the two functions exist.  I'll look at the code when I get a
> chance and see if I think it's written the way it ought to be.  If you
> have a better design than the two functions, let me know.  The code can
> be changed.

IMHO, the db_setvalue can be killed and every code be switched to change
db_setvalue_and_* -- it's the db-storing that figures if the timestamp
needs to be saved.

-- 
Matthias Andree




More information about the bogofilter-dev mailing list