timestamp=0 fails
David Relson
relson at osagesoftware.com
Wed Nov 5 13:21:09 CET 2003
On Wed, 05 Nov 2003 10:20:05 +0100
Boris 'pi' Piwinger <3.14 at logic.univie.ac.at> wrote:
> Hi!
>
> I have "timestamp=0" in my config. bogoutil -d reveals that
> there are timestamps in my (newly built) database anyhow. So
> it fails.
>
> pi
pi,
Right you are. The timestamp code is currently broken. Attached is a
patch for you to test.
David
-------------- next part --------------
diff -u -r1.17 datastore.c
--- datastore.c 3 Nov 2003 00:35:47 -0000 1.17
+++ datastore.c 5 Nov 2003 12:19:05 -0000
@@ -117,7 +117,7 @@
cv[i++] = !dsh->is_swapped ? in_data->count[dsh->index] : swap_32bit(in_data->count[dsh->index]);
}
- if (timestamp_tokens || in_data->date != 0)
+ if (timestamp_tokens && in_data->date != 0)
cv[i++] = !dsh->is_swapped ? in_data->date : swap_32bit(in_data->date);
ex_data->leng = i * sizeof(cv[0]);
@@ -236,7 +236,7 @@
ex_data.data = cv;
ex_data.size = sizeof(cv);
- if (timestamp_tokens || today != 0)
+ if (timestamp_tokens && today != 0)
val->date = today;
for (dsh->index = 0; dsh->index < dsh->count; dsh->index++) {
@@ -381,7 +381,7 @@
void ds_set_msgcounts(void *vhandle, dsv_t *val)
{
dsh_t *dsh = vhandle;
- if (val->date == 0 && timestamp_tokens)
+ if (timestamp_tokens && val->date != 0)
val->date = today;
ds_write(dsh, msg_count_tok, val);
return;
More information about the bogofilter
mailing list