db4.1.24 patch attached. -- Casey
Index: c2s/authreg_db.c
===================================================================
RCS file: /home/cvs/jabberd2/c2s/authreg_db.c,v
retrieving revision 1.3
diff -u -r1.3 authreg_db.c
--- c2s/authreg_db.c 1 Nov 2002 03:54:46 -0000 1.3
+++ c2s/authreg_db.c 7 Nov 2002 23:09:31 -0000
@@ -65,7 +65,13 @@
return NULL;
}
- err = db->open(db, "authreg.db", realm, DB_HASH, DB_CREATE, 0);
+ /* Fixed for DB version 4.1.24 and greater, dunno how much accuracy this has
+though, could be just 4.1 */
+ #if DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 1 && DB_VERSION_PATCH >= 24
+ err = db->open(db, NULL, "authreg.db", realm, DB_HASH, DB_CREATE, 0);
+ #else
+ err = db->open(db, "authreg.db", realm, DB_HASH, DB_CREATE, 0);
+ #endif
+
if(err != 0)
{
log_write(ar->c2s->log, LOG_ERR, "couldn't open db for realm '%s': %s",
realm, db_strerror(err));
Index: sm/storage_db.c
===================================================================
RCS file: /home/cvs/jabberd2/sm/storage_db.c,v
retrieving revision 1.6
diff -u -r1.6 storage_db.c
--- sm/storage_db.c 5 Nov 2002 02:39:54 -0000 1.6
+++ sm/storage_db.c 7 Nov 2002 23:09:33 -0000
@@ -99,8 +99,13 @@
free(dbd);
return st_FAILED;
}
+ /* Fixed for DB version 4.1.24 and greater, dunno how much accuracy this has
+though, could be just 4.1 */
+ #if DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 1 && DB_VERSION_PATCH >= 24
+ err = dbd->db->open(dbd->db, NULL, "sm.db", type, DB_HASH, DB_CREATE, 0);
+ #else
+ err = dbd->db->open(dbd->db, "sm.db", type, DB_HASH, DB_CREATE, 0);
+ #endif
- err = dbd->db->open(dbd->db, "sm.db", type, DB_HASH, DB_CREATE, 0);
if(err != 0)
{
log_write(drv->st->sm->log, LOG_ERR, "couldn't open storage db: %s",
db_strerror(err));
msg07628/pgp00000.pgp
Description: PGP signature
