]> git.sur5r.net Git - openldap/commitdiff
ITS#7207 check for ld->ld_defconn
authorHoward Chu <hyc@openldap.org>
Mon, 26 Mar 2012 10:32:11 +0000 (03:32 -0700)
committerHoward Chu <hyc@openldap.org>
Mon, 26 Mar 2012 10:35:31 +0000 (03:35 -0700)
libraries/libldap/cyrus.c

index 024810103533a46505a1a389ccb71eab23a84d94..2475a87b13c82648bffd8d06863302669b5dd3fb 100644 (file)
@@ -419,7 +419,7 @@ ldap_int_sasl_bind(
                LDAP_MUTEX_LOCK( &ld->ld_conn_mutex );
                ber_sockbuf_ctrl( ld->ld_sb, LBER_SB_OPT_GET_FD, &sd );
 
-               if ( sd == AC_SOCKET_INVALID ) {
+               if ( sd == AC_SOCKET_INVALID || !ld->ld_defconn ) {
                        /* not connected yet */
 
                        rc = ldap_open_defconn( ld );