More for prev commit - only set if URL was provided.

(should URL be mandatory?)
This commit is contained in:
Howard Chu 2009-11-18 22:37:02 +00:00
parent a248701ed2
commit 61be1d55d3

View File

@ -271,7 +271,8 @@ ldap_init_fd(
ldap_unbind_ext( ld, NULL, NULL );
return( LDAP_NO_MEMORY );
}
conn->lconn_server = ldap_url_dup( ld->ld_options.ldo_defludp );
if( url )
conn->lconn_server = ldap_url_dup( ld->ld_options.ldo_defludp );
ber_sockbuf_ctrl( conn->lconn_sb, LBER_SB_OPT_SET_FD, &fd );
ld->ld_defconn = conn;
++ld->ld_defconn->lconn_refcnt; /* so it never gets closed/freed */