]> git.sur5r.net Git - openldap/commitdiff
remove unrequired member; address ITS#3913
authorPierangelo Masarati <ando@openldap.org>
Tue, 2 Aug 2005 22:48:30 +0000 (22:48 +0000)
committerPierangelo Masarati <ando@openldap.org>
Tue, 2 Aug 2005 22:48:30 +0000 (22:48 +0000)
servers/slapd/back-ldap/back-ldap.h
servers/slapd/back-ldap/bind.c
servers/slapd/back-ldap/delete.c
servers/slapd/back-ldap/init.c
servers/slapd/back-ldap/modify.c
servers/slapd/back-ldap/modrdn.c

index d33ea3c1830f28e2bfbb14e443babba5cfb3843f..7a62b1dff2858fdd3f7b4c38bd52df8634914fbc 100644 (file)
@@ -38,7 +38,6 @@ struct ldapconn {
        struct berval           lc_local_ndn;
        int                     lc_bound;
        int                     lc_ispriv;
-       ldap_pvt_thread_mutex_t lc_mutex;
        unsigned                lc_refcnt;
 };
 
index e47e6e451921b6bfbe16b176002f4291a37e098b..f10b5feef9807c36dcde016eeb4732d959102ffb 100644 (file)
@@ -457,8 +457,6 @@ retry_lock:;
                lc->lc_conn = lc_curr.lc_conn;
                ber_dupbv( &lc->lc_local_ndn, &lc_curr.lc_local_ndn );
 
-               ldap_pvt_thread_mutex_init( &lc->lc_mutex );
-
                if ( lc_curr.lc_ispriv ) {
                        ber_dupbv( &lc->lc_cred, &li->acl_passwd );
                        ber_dupbv( &lc->lc_bound_ndn, &li->acl_authcDN );
@@ -553,8 +551,7 @@ retry_lock:;
  * it from all the callers, and I made the function return the flag, so
  * it can be used to simplify the check.
  *
- * Note: lc_mutex is locked; dolock indicates whether li->conn_mutex
- * must be locked or not
+ * Note: dolock indicates whether li->conn_mutex must be locked or not
  */
 static int
 ldap_back_dobind_int(
@@ -707,13 +704,7 @@ done:;
 int
 ldap_back_dobind( struct ldapconn *lc, Operation *op, SlapReply *rs, ldap_back_send_t sendok )
 {
-       int     rc;
-
-       ldap_pvt_thread_mutex_lock( &lc->lc_mutex );
-       rc = ldap_back_dobind_int( lc, op, rs, sendok, 1, 1 );
-       ldap_pvt_thread_mutex_unlock( &lc->lc_mutex );
-
-       return rc;
+       return ldap_back_dobind_int( lc, op, rs, sendok, 1, 1 );
 }
 
 /*
index 08c970388e975f21a5588bf117d3770f2f0a0754..4c615b5e487c5d67f96c26ae38888efc92093024 100644 (file)
@@ -45,14 +45,14 @@ ldap_back_delete(
        lc = ldap_back_getconn( op, rs, LDAP_BACK_SENDERR );
        
        if ( !lc || !ldap_back_dobind( lc, op, rs, LDAP_BACK_SENDERR ) ) {
-               return -1;
+               return rs->sr_err;
        }
 
        ctrls = op->o_ctrls;
        rc = ldap_back_proxy_authz_ctrl( lc, op, rs, &ctrls );
        if ( rc != LDAP_SUCCESS ) {
                send_ldap_result( op, rs );
-               rc = -1;
+               rc = rs->sr_err;
                goto cleanup;
        }
 
index 82e0900ca3cc59471359e4159ae041a12ad41321..f250f6d0d99a1d2cd42403eb7e7bd8abbeddabf2 100644 (file)
@@ -216,7 +216,6 @@ ldap_back_conn_free( void *v_lc )
        if ( !BER_BVISNULL( &lc->lc_local_ndn ) ) {
                ch_free( lc->lc_local_ndn.bv_val );
        }
-       ldap_pvt_thread_mutex_destroy( &lc->lc_mutex );
        ch_free( lc );
 }
 
index 5acd9a1aae6126862cb5e3bf9ae579b5903f8f79..6ba89953ea684b3c0216b386dd2ce080ee224707 100644 (file)
@@ -48,7 +48,7 @@ ldap_back_modify(
 
        lc = ldap_back_getconn( op, rs, LDAP_BACK_SENDERR );
        if ( !lc || !ldap_back_dobind( lc, op, rs, LDAP_BACK_SENDERR ) ) {
-               return -1;
+               return rs->sr_err;
        }
 
        for ( i = 0, ml = op->oq_modify.rs_modlist; ml; i++, ml = ml->sml_next )
index 437ba646e752f16fc0e6caa22d4338ac1174c69d..0890b26d19cb29e0bbaf9f70b1a05bdfad26185a 100644 (file)
@@ -45,7 +45,7 @@ ldap_back_modrdn(
 
        lc = ldap_back_getconn( op, rs, LDAP_BACK_SENDERR );
        if ( !lc || !ldap_back_dobind( lc, op, rs, LDAP_BACK_SENDERR ) ) {
-               return -1;
+               return rs->sr_err;
        }
 
        if ( op->orr_newSup ) {