[cvs] bogofilter/src datastore_db.c,1.68,1.69
Fast Bayesian spam filter along lines suggested by Paul Graham
Brought to you by:
m-a
From: <m-...@us...> - 2004-02-10 22:32:56
|
Update of /cvsroot/bogofilter/bogofilter/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12926 Modified Files: datastore_db.c Log Message: Remove cruft. Index: datastore_db.c =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/src/datastore_db.c,v retrieving revision 1.68 retrieving revision 1.69 diff -u -d -r1.68 -r1.69 --- datastore_db.c 9 Feb 2004 12:14:53 -0000 1.68 +++ datastore_db.c 10 Feb 2004 22:29:16 -0000 1.69 @@ -109,7 +109,7 @@ handle->path = xstrdup(path); handle->name = xmalloc(len); build_path(handle->name, len, path, name); - + handle->locked = false; handle->is_swapped = false; @@ -305,7 +305,6 @@ (short int)(open_mode == DB_READ ? F_RDLCK : F_WRLCK))) { int e = errno; - handle->fd = -1; db_close(handle, true); handle = NULL; /* db_close freed it, we don't want to use it anymore */ errno = e; @@ -387,16 +386,6 @@ ret = dbp->get(dbp, NULL, &db_key, &db_data, 0); -#if 0 - if (val->leng < db_data.size) { - print_error(__FILE__, __LINE__, "(db) db_get_dbvalue( '%.*s' ), size error %lu::%lu", - CLAMP_INT_MAX(token->leng), (char *)token->data, - (unsigned long)val->leng, - (unsigned long)db_data.size); - exit(EX_ERROR); - } -#endif - val->leng = db_data.size; /* read count */ switch (ret) { @@ -464,13 +453,6 @@ fprintf(dbgout, "db_close (%s) %s\n", handle->name, nosync ? "nosync" : "sync"); -#if 0 - if (handle->fd >= 0) { - ds_lock(handle->fd, F_UNLCK, - (short int)(handle->open_mode == DB_READ ? F_RDLCK : F_WRLCK)); - } -#endif - if ((ret = dbp->close(dbp, f))) print_error(__FILE__, __LINE__, "(db) db_close err: %d, %s", ret, db_strerror(ret)); |