From: Pierangelo Masarati Date: Tue, 2 Aug 2005 22:48:30 +0000 (+0000) Subject: remove unrequired member; address ITS#3913 X-Git-Tag: OPENLDAP_AC_BP~98 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4ed743cc84099667e7fe462286188a7382ef7580;p=openldap remove unrequired member; address ITS#3913 --- diff --git a/servers/slapd/back-ldap/back-ldap.h b/servers/slapd/back-ldap/back-ldap.h index d33ea3c183..7a62b1dff2 100644 --- a/servers/slapd/back-ldap/back-ldap.h +++ b/servers/slapd/back-ldap/back-ldap.h @@ -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; }; diff --git a/servers/slapd/back-ldap/bind.c b/servers/slapd/back-ldap/bind.c index e47e6e4519..f10b5feef9 100644 --- a/servers/slapd/back-ldap/bind.c +++ b/servers/slapd/back-ldap/bind.c @@ -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 ); } /* diff --git a/servers/slapd/back-ldap/delete.c b/servers/slapd/back-ldap/delete.c index 08c970388e..4c615b5e48 100644 --- a/servers/slapd/back-ldap/delete.c +++ b/servers/slapd/back-ldap/delete.c @@ -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; } diff --git a/servers/slapd/back-ldap/init.c b/servers/slapd/back-ldap/init.c index 82e0900ca3..f250f6d0d9 100644 --- a/servers/slapd/back-ldap/init.c +++ b/servers/slapd/back-ldap/init.c @@ -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 ); } diff --git a/servers/slapd/back-ldap/modify.c b/servers/slapd/back-ldap/modify.c index 5acd9a1aae..6ba89953ea 100644 --- a/servers/slapd/back-ldap/modify.c +++ b/servers/slapd/back-ldap/modify.c @@ -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 ) diff --git a/servers/slapd/back-ldap/modrdn.c b/servers/slapd/back-ldap/modrdn.c index 437ba646e7..0890b26d19 100644 --- a/servers/slapd/back-ldap/modrdn.c +++ b/servers/slapd/back-ldap/modrdn.c @@ -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 ) {