]> git.sur5r.net Git - openldap/commitdiff
Fix server unavailable handling bug introduced by the ldap_open to
authorKurt Zeilenga <kurt@openldap.org>
Sun, 12 Dec 1999 20:12:39 +0000 (20:12 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sun, 12 Dec 1999 20:12:39 +0000 (20:12 +0000)
ldap_init change.   Fix suggested by Jay D. Allen <jay@fork.com>.

servers/slurpd/ldap_op.c

index 4c75947010075efc576224517589b798b723b84e..79d1ba34674e435a4de4ca4e01f66b4165591b43 100644 (file)
@@ -89,8 +89,10 @@ do_ldap(
     while ( retry > 0 ) {
        if ( ri->ri_ldp == NULL ) {
            rc = do_bind( ri, &lderr );
+
            if ( rc != BIND_OK ) {
-               return DO_LDAP_ERR_RETRYABLE;
+                       (void) do_unbind( ri );
+                       return DO_LDAP_ERR_RETRYABLE;
            }
        }