]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/overlays/pcache.c
Merge remote-tracking branch 'origin/mdb.master' into OPENLDAP_REL_ENG_2_5
[openldap] / servers / slapd / overlays / pcache.c
index 1fa8d1ede429d10ce96fb3f1faf6c5f0ab386083..84c9d237a94125de0b624d70fa4b63509e6ff5da 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2003-2013 The OpenLDAP Foundation.
+ * Copyright 2003-2014 The OpenLDAP Foundation.
  * Portions Copyright 2003 IBM Corporation.
  * Portions Copyright 2003-2009 Symas Corporation.
  * All rights reserved.
@@ -37,7 +37,6 @@
 
 #include "config.h"
 
-#ifdef LDAP_DEVEL
 /*
  * Control that allows to access the private DB
  * instead of the public one
@@ -53,7 +52,6 @@
  * Monitoring
  */
 #define PCACHE_MONITOR
-#endif
 
 /* query cache structs */
 /* query */
@@ -2794,17 +2792,16 @@ pcache_op_privdb(
        /* map tag to operation */
        type = slap_req2op( op->o_tag );
        if ( type != SLAP_OP_LAST ) {
-               BI_op_func      **func;
+               BackendInfo     *bi = cm->db.bd_info;
                int             rc;
 
                /* execute, if possible */
-               func = &cm->db.be_bind;
-               if ( func[ type ] != NULL ) {
+               if ( (&bi->bi_op_bind)[ type ] ) {
                        Operation       op2 = *op;
        
                        op2.o_bd = &cm->db;
 
-                       rc = func[ type ]( &op2, rs );
+                       rc = (&bi->bi_op_bind)[ type ]( &op2, rs );
                        if ( type == SLAP_OP_BIND && rc == LDAP_SUCCESS ) {
                                op->o_conn->c_authz_cookie = cm->db.be_private;
                        }