compile problems with tdb
Gyepi SAM
gyepi at praxis-sw.com
Thu Dec 18 19:56:02 CET 2003
On Thu, Dec 18, 2003 at 06:58:59PM +0100, Torsten Veller wrote:
> again there are problems with tdb and bogofilter 0.15.11.
> After ./configure --with-database=tdb the make stops with the following
> message:
Yikes! This error is due to a set of recent changes to a common data structure
that was propogated to datastore_db.c but not the other datastore_xx.c files.
I have corrected both datastore_tdb.c and datastore_qdbm.c in CVS.
Here's a patch for datastore_tdb.c.
-Gyepi
Index: datastore_tdb.c
===================================================================
RCS file: /cvsroot/bogofilter/bogofilter/src/datastore_tdb.c,v
retrieving revision 1.19
diff -B -u -b -r1.19 datastore_tdb.c
--- datastore_tdb.c 9 Dec 2003 02:08:45 -0000 1.19
+++ datastore_tdb.c 18 Dec 2003 18:49:13 -0000
@@ -179,17 +179,17 @@
TDB_CONTEXT *dbp = handle->dbp[dsh->index];
db_key.dptr = token->data;
- db_key.dsize = token->size;
+ db_key.dsize = token->leng;
db_data = tdb_fetch(dbp, db_key);
if (db_data.dptr == NULL)
return DS_NOTFOUND;
- if (val->size < db_data.dsize) {
+ if (val->leng < db_data.dsize) {
print_error(__FILE__, __LINE__, "(db) db_get_dbvalue( '%.*s' ), size error %lu::%lu",
CLAMP_INT_MAX(token->leng), (char *)token->data,
- (unsigned long)val->size,
+ (unsigned long)val->leng,
(unsigned long)db_data.dsize);
exit(EX_ERROR);
}
@@ -291,7 +291,6 @@
dbv_data.data = data.dptr;
dbv_data.leng = data.dsize; /* read count */
- dbv_data.size = data.dsize;
/* call user function */
rc = hookdata->hook(&dbv_key, &dbv_data, hookdata->userdata);
More information about the Bogofilter
mailing list