From 9f5b28baf34973673aff40eec51e41445ce06518 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Mon, 26 Aug 2002 22:20:30 +0000 Subject: [PATCH] Remove c_sasl_bindmutex, Binds are already serialized. --- servers/slapd/bind.c | 6 +----- servers/slapd/connection.c | 2 -- servers/slapd/slap.h | 1 - 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/servers/slapd/bind.c b/servers/slapd/bind.c index 9d8f6ba159..e4e8dd5e18 100644 --- a/servers/slapd/bind.c +++ b/servers/slapd/bind.c @@ -232,7 +232,6 @@ do_bind( } /* Set the bindop for the benefit of in-directory SASL lookups */ - ldap_pvt_thread_mutex_lock( &conn->c_sasl_bindmutex ); conn->c_sasl_bindop = op; if ( method == LDAP_AUTH_SASL ) { @@ -574,10 +573,7 @@ do_bind( } cleanup: - if( conn->c_sasl_bindop != NULL ) { - conn->c_sasl_bindop = NULL; - ldap_pvt_thread_mutex_unlock( &conn->c_sasl_bindmutex ); - } + conn->c_sasl_bindop = NULL; if( pdn.bv_val != NULL ) { free( pdn.bv_val ); diff --git a/servers/slapd/connection.c b/servers/slapd/connection.c index 374bc73f5c..e59d4f047b 100644 --- a/servers/slapd/connection.c +++ b/servers/slapd/connection.c @@ -139,7 +139,6 @@ int connections_destroy(void) ber_sockbuf_free( connections[i].c_sb ); ldap_pvt_thread_mutex_destroy( &connections[i].c_mutex ); ldap_pvt_thread_mutex_destroy( &connections[i].c_write_mutex ); - ldap_pvt_thread_mutex_destroy( &connections[i].c_sasl_bindmutex ); ldap_pvt_thread_cond_destroy( &connections[i].c_write_cv ); } } @@ -451,7 +450,6 @@ long connection_init( /* should check status of thread calls */ ldap_pvt_thread_mutex_init( &c->c_mutex ); ldap_pvt_thread_mutex_init( &c->c_write_mutex ); - ldap_pvt_thread_mutex_init( &c->c_sasl_bindmutex ); ldap_pvt_thread_cond_init( &c->c_write_cv ); c->c_struct_state = SLAP_C_UNUSED; diff --git a/servers/slapd/slap.h b/servers/slapd/slap.h index fc1bd20a43..847174e733 100644 --- a/servers/slapd/slap.h +++ b/servers/slapd/slap.h @@ -1620,7 +1620,6 @@ typedef struct slap_conn { void *c_sasl_context; /* SASL session context */ void *c_sasl_extra; /* SASL session extra stuff */ struct slap_op *c_sasl_bindop; /* set to current op if it's a bind */ - ldap_pvt_thread_mutex_t c_sasl_bindmutex; /* lock for bindop */ PagedResultsState c_pagedresults_state; /* paged result state */ -- 2.39.5