]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldap/search.c
Happy New Year!
[openldap] / servers / slapd / back-ldap / search.c
index e60d6bfc5488eabab8e3ec359d38b6e3c251074e..0b7a958d3a1e25f2cffed624254315f86abb2bb3 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1999-2004 The OpenLDAP Foundation.
+ * Copyright 1999-2005 The OpenLDAP Foundation.
  * Portions Copyright 1999-2003 Howard Chu.
  * Portions Copyright 2000-2003 Pierangelo Masarati.
  * All rights reserved.
@@ -462,7 +462,7 @@ ldap_build_entry(
                                        attr->a_desc->ad_type->sat_syntax,
                                        attr->a_desc->ad_type->sat_equality,
                                        &attr->a_vals[i], &attr->a_nvals[i],
-                                       NULL /* op->o_tmpmemctx */ );
+                                       NULL );
 
                                if ( rc != LDAP_SUCCESS ) {
                                        BER_BVZERO( &attr->a_nvals[i] );
@@ -498,7 +498,8 @@ ldap_back_entry_get(
 {
        struct ldapconn *lc;
        int             rc = 1,
-                       is_oc;
+                       is_oc,
+                       do_not_cache;
        struct berval   bdn;
        LDAPMessage     *result = NULL,
                        *e = NULL;
@@ -509,17 +510,17 @@ ldap_back_entry_get(
        int             do_retry = 1;
 
        /* Tell getconn this is a privileged op */
-       is_oc = op->o_do_not_cache;
+       do_not_cache = op->o_do_not_cache;
        op->o_do_not_cache = 1;
        lc = ldap_back_getconn( op, &rs );
        oconn = op->o_conn;
        op->o_conn = NULL;
        if ( !lc || !ldap_back_dobind( lc, op, &rs ) ) {
-               op->o_do_not_cache = is_oc;
+               op->o_do_not_cache = do_not_cache;
                op->o_conn = oconn;
                return 1;
        }
-       op->o_do_not_cache = is_oc;
+       op->o_do_not_cache = do_not_cache;
        op->o_conn = oconn;
 
        if ( at ) {