bogofilter -u broken: locking issue

Eric Seppanen eds at reric.net
Thu Oct 10 23:57:57 CEST 2002


On Thu, Oct 10, 2002 at 03:31:23PM -0400, David Relson wrote:
> At 03:17 PM 10/10/02, Gyepi SAM wrote:
> 
> >Absolutely, it would work.
> >We could also add a REG_UPDATE type and set the register_type accordingly,
> >of course the code later would have to change to
> >
> >         if register_type == REG_NONE || register_type == REG_UPDATE){...}
> >
> >so it doesn't really matter one way or the other.
> >
> >I am generally not happy with how early we open the databases and would 
> >like to
> >delay as mentioned before.
> 
> Stepping through the code, setup_lists() is called shortly before 
> bogofilter().  Bogofilter() calls collect_words() and, right after that, it 
> needs the lists.  Delaying the call to setup_lists() those few instructions 
> seems very doable, though the impact seems small.  However, if it makes the 
> code cleaner ...

Any changes you make here are colliding with my work trying to get the 
config file integrated, because:

1. Directory handling inside functions like setup_lists() doesn't make 
sense, because there's more code that needs to do similar things.  So I've 
pulled directory handling out into a separate set of functions.  You're 
not exactly changing this much, but every time we touch the same line of 
code it makes more work.

2. Placing new requirements on when and where list initialization occurs 
will be troublesome because I'm adding the config function to add new 
lists.  I'm not sure what to do about this because right now, the config 
file parser ends up calling init_list().  Right now we make no distinction 
between loading the list structure data (name, weight, etc.) and actually 
opening the database.

I haven't committed these two changes because I haven't made sure the 
whole thing works yet.  However, the directory handling is very 
straightforward and I could probably commit that at any time if nobody 
objects.



More information about the bogofilter-dev mailing list