if( rc == LDAP_SUCCESS && bdb->bi_txn_cp ) {
ldap_pvt_thread_yield();
- txn_checkpoint( bdb->bi_dbenv,
+ TXN_CHECKPOINT( bdb->bi_dbenv,
bdb->bi_txn_cp_kbyte, bdb->bi_txn_cp_min, 0 );
}
int boi_err;
};
+#if DB_VERSION_MAJOR < 4
+#define TXN_CHECKPOINT(env, k, m, f) txn_checkpoint(env, k, m, f)
+#define LOCK_DETECT(env, f, t, a) lock_detect(env, f, t, a)
+#else
+#define TXN_CHECKPOINT(env, k, m, f) (env)->txn_checkpoint(env, k, m, f)
+#define LOCK_DETECT(env, f, t, a) (env)->lock_detect(env, f, t, a)
+#endif
+
LDAP_END_DECL
#include "proto-bdb.h"
if(rc == LDAP_SUCCESS && bdb->bi_txn_cp ) {
ldap_pvt_thread_yield();
- txn_checkpoint( bdb->bi_dbenv,
+ TXN_CHECKPOINT( bdb->bi_dbenv,
bdb->bi_txn_cp_kbyte, bdb->bi_txn_cp_min, 0 );
}
int rc;
sleep( bdb->bi_lock_detect_seconds );
- rc = lock_detect( bdb->bi_dbenv, 0,
+ rc = LOCK_DETECT( bdb->bi_dbenv, 0,
bdb->bi_lock_detect, NULL );
if( rc != 0 ) {
/* force a checkpoint */
if( bdb->bi_txn ) {
- rc = txn_checkpoint( bdb->bi_dbenv, 0, 0, DB_FORCE );
+ rc = TXN_CHECKPOINT( bdb->bi_dbenv, 0, 0, DB_FORCE );
if( rc != 0 ) {
Debug( LDAP_DEBUG_ANY,
"bdb_db_destroy: txn_checkpoint failed: %s (%d)\n",
if( rc == LDAP_SUCCESS && bdb->bi_txn_cp ) {
ldap_pvt_thread_yield();
- txn_checkpoint( bdb->bi_dbenv,
+ TXN_CHECKPOINT( bdb->bi_dbenv,
bdb->bi_txn_cp_kbyte, bdb->bi_txn_cp_min, 0 );
}
if( rc == LDAP_SUCCESS && bdb->bi_txn_cp ) {
ldap_pvt_thread_yield();
- txn_checkpoint( bdb->bi_dbenv,
+ TXN_CHECKPOINT( bdb->bi_dbenv,
bdb->bi_txn_cp_kbyte, bdb->bi_txn_cp_min, 0 );
}