commit 2a9b0bd763e8ee9874f1a03c197461a36aa1bc24
parent 9b657a46a0652dc702beccc518bc83a50825ab19
Author: Oswald Buddenhagen <ossi@users.sf.net>
Date: Tue, 24 Oct 2006 17:37:57 +0000
don't crash on truncating database. seems to affect only some bdb
versions (e.g., 4.2).
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/drv_maildir.c b/src/drv_maildir.c
@@ -365,7 +365,8 @@ maildir_init_uid( maildir_store_t *ctx, const char *msg )
ctx->uvok = 0;
#ifdef USE_DB
if (ctx->db) {
- ctx->db->truncate( ctx->db, 0, 0 /* &u_int32_t_dummy */, 0 );
+ u_int32_t count;
+ ctx->db->truncate( ctx->db, 0, &count, 0 );
return maildir_set_uid( ctx, 0, 0 );
}
#endif /* USE_DB */
@@ -496,7 +497,7 @@ maildir_scan( maildir_store_t *ctx, msglist_t *msglist )
DBC *dbc;
#endif /* USE_DB */
msg_t *entry;
- int i, j, uid, bl, ml, fnl, ret;
+ int i, j, uid, bl, fnl, ret;
struct stat st;
char buf[_POSIX_PATH_MAX], nbuf[_POSIX_PATH_MAX];