/* $OpenLDAP$ */
/*
- * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
/* Portions
host = srv->lud_host;
}
+ if( !port ) {
+ if( strcmp(srv->lud_scheme, "ldaps") == 0 ) {
+ port = LDAPS_PORT;
+ } else {
+ port = LDAP_PORT;
+ }
+ }
+
rc = ldap_connect_to_host( ld, conn->lconn_sb,
proto, host, addr, port, async );
#endif
break;
#ifdef LDAP_CONNECTIONLESS
+
case LDAP_PROTO_UDP:
port = srv->lud_port;
} else {
host = srv->lud_host;
}
+
+ if( !port ) port = LDAP_PORT;
+
LDAP_IS_UDP(ld) = 1;
rc = ldap_connect_to_host( ld, conn->lconn_sb,
proto, host, addr, port, async );