]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldap/bind.c
ITS#8576 Revert "LDAP_TAILQ fix"
[openldap] / servers / slapd / back-ldap / bind.c
index 598dae3fd99837e1d0d37e1ccc13dc96c8aa0339..5d6034ad67611453cc542243b838045fb3043b2b 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1999-2015 The OpenLDAP Foundation.
+ * Copyright 1999-2017 The OpenLDAP Foundation.
  * Portions Copyright 2000-2003 Pierangelo Masarati.
  * Portions Copyright 1999-2003 Howard Chu.
  * All rights reserved.
@@ -271,6 +271,8 @@ retry:;
                if ( ldap_back_retry( &lc, op, rs, LDAP_BACK_BIND_SERR ) ) {
                        goto retry;
                }
+               if ( !lc )
+                       return( rc );
        }
 
        ldap_pvt_thread_mutex_lock( &li->li_counter_mutex );
@@ -924,7 +926,7 @@ retry_lock:
 
                        if ( lc != NULL ) {
                                if ( lc != LDAP_TAILQ_LAST( &li->li_conn_priv[ LDAP_BACK_CONN2PRIV( lc ) ].lic_priv,
-                                       ldapconn_t, lc_q ) )
+                                       lc_conn_priv_q ) )
                                {
                                        LDAP_TAILQ_REMOVE( &li->li_conn_priv[ LDAP_BACK_CONN2PRIV( lc ) ].lic_priv,
                                                lc, lc_q );