My (currently) preferred fix is attached. The only thing
DB_VERISON_CHECK(2,0,0) should be protecting is "flags".
DB_UNKNOWN is preferred for the read-only case since in that instance the
database has already been created so selecting (or asserting) a database
mode isn't useful there.
I changed the database type back to DB_HASH for back-compatibility. I had
decided DB_BTREE might be better for use with dkim-stats since then the
output would be automatically sorted, but back-compatibility is probably
more important.
Thanks for the report.
-MSK
--- dkim-filter/dkim-db.c:1.7 Tue Mar 11 14:17:25 2008
+++ dkim-filter/dkim-db.c Sat Mar 29 21:54:45 2008
@@ -51,18 +51,20 @@
assert(db != NULL);
assert(file != NULL);
-#if DB_VERSION_CHECK(2,0,0)
if (ro)
{
+#if DB_VERSION_CHECK(2,0,0)
flags |= DB_RDONLY;
+#endif /* DB_VERSION_CHECK(2,0,0) */
dbtype = DB_UNKNOWN;
}
else
{
+#if DB_VERSION_CHECK(2,0,0)
flags |= DB_CREATE;
- dbtype = DB_BTREE;
- }
#endif /* DB_VERSION_CHECK(2,0,0) */
+ dbtype = DB_HASH;
+ }
#if DB_VERSION_CHECK(3,0,0)
status = db_create(db, NULL, 0);
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
dkim-milter-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dkim-milter-discuss