patch for reading config files
David Relson
relson at osagesoftware.com
Wed Mar 5 15:01:45 CET 2003
Greetings,
Bogofilter-0.11.1 considers it an error when it can't read the system
config file (/etc/bogofilter.cf). After that error, it doesn't try to read
the user config file (~/.bogofilter.cf). This is a defect in the code.
Bogofilter should read the user config file whether or not it can read the
system config file (unless the '-c' or '-C' options have been used).
The problem is fixed by the patch below. The patch has been uploaded to
sourceforge. I'll build a new release either today or tomorrow to fix this
problem and whatever else shows up.
David
Index: configfile.c
===================================================================
RCS file: /cvsroot/bogofilter/bogofilter/src/configfile.c,v
retrieving revision 1.13
diff -u -r1.13 configfile.c
--- configfile.c 4 Mar 2003 21:52:24 -0000 1.13
+++ configfile.c 5 Mar 2003 13:50:55 -0000
@@ -253,10 +253,14 @@
/* exported */
bool process_config_files(bool warn_on_error)
{
- if (!suppress_config_file &&
- (!read_config_file(system_config_file, false, warn_on_error) ||
- !read_config_file(user_config_file, true, warn_on_error)))
- return false;
+ book ok = true;
- return true;
+ if (!suppress_config_file) {
+ if (!read_config_file(system_config_file, false, warn_on_error))
+ ok = false;
+ if (!read_config_file(user_config_file, true, warn_on_error))
+ ok = false;
+ }
+
+ return ok;
}
More information about the Bogofilter
mailing list