[cvs] bogofilter/src bogotune.c,1.157,1.158

David Relson relson at osagesoftware.com
Fri Oct 1 05:10:50 CEST 2004


On Fri, 01 Oct 2004 04:11:31 +0200
Matthias Andree wrote:

> David Relson <relson at osagesoftware.com> writes:
> 
> >> Wouldn't we rather add an option so that bogotune can tell the data
> >> base stuff "data base in memory, no bogohome needed"? I wonder if
> >the> patch you made leaves all the environment stuff in still - which
> >is> useless for an in-memory data base which goes away with program
> >> shutdown.
> >
> > Are you suggesting a flag for "-D is set" and testing that before
> > "assert(bogohome)"?
> 
> Yup, that flag would be database_in_RAM or something.
> OK, doesn't matter too much, as assert() is a debug option and I'd
> used it to catch such situations before the NULL dereference or
> EINVAL. :-)

Hmmm.  "-d dir" means "external DB (on drive)" while "-D" means
"internal DB (in ram)".  By implication, "-D" means "create ram DB".

Alternatively, an enum for "DiskDB, RamDB, UnknownDB" could be used.
Assuming initial state of UnknownDB, the value should still be Unknown
when either option is processed.  Any other value is an error.  As one
of the options is needed by bogotune, having state UnknownDB after
option processing is also an error.



More information about the bogofilter-dev mailing list