]> git.sur5r.net Git - openldap/commitdiff
fix database operations in tool mode (ITS#3622)
authorPierangelo Masarati <ando@openldap.org>
Fri, 1 Apr 2005 12:20:02 +0000 (12:20 +0000)
committerPierangelo Masarati <ando@openldap.org>
Fri, 1 Apr 2005 12:20:02 +0000 (12:20 +0000)
servers/slapd/back-bdb/cache.c

index ca07d0529b2ff4ed087f6c810352e13dd6adbb21..dd7a661577e65c0abba64cc6c1327f817792f387 100644 (file)
@@ -1245,6 +1245,11 @@ bdb_txn_get( Operation *op, DB_ENV *env, DB_TXN **txn, int reset )
        int i, rc;
        void *ctx, *data = NULL;
 
+       if ( slapMode & SLAP_TOOL_MODE ) {
+               *txn = NULL;
+               return 0;
+       }
+
        /* If no op was provided, try to find the ctx anyway... */
        if ( op ) {
                ctx = op->o_threadctx;