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 );
char *ha_buf=NULL, *p, *q;
int socktype;
- osip_debug(ld, "ldap_connect_to_host: %s\n",host,0,0);
switch(proto) {
- case LDAP_PROTO_TCP: socktype = SOCK_STREAM; break;
- case LDAP_PROTO_UDP: socktype = SOCK_DGRAM; break;
- default: osip_debug(ld, "ldap_connect_to_host: unknown proto: %d\n",
- proto, 0, 0);
+ case LDAP_PROTO_TCP: socktype = SOCK_STREAM;
+ osip_debug(ld, "ldap_connect_to_host: TCP %s:%d\n",host,port,0);
+ break;
+ case LDAP_PROTO_UDP: socktype = SOCK_DGRAM;
+ osip_debug(ld, "ldap_connect_to_host: TCP %s:%d\n",host,port,0);
+ break;
+
+ default:
+ osip_debug(ld, "ldap_connect_to_host: unknown proto: %d\n",
+ proto, 0, 0);
return -1;
}