mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-22 07:39:35 -05:00
ITS#9743 init client socket port
also silence meaningless warning
This commit is contained in:
parent
45720734ea
commit
69727ebbc8
1 changed files with 3 additions and 1 deletions
|
|
@ -263,7 +263,7 @@ ldap_pvt_is_socket_ready(LDAP *ld, int s)
|
||||||
== AC_SOCKET_ERROR )
|
== AC_SOCKET_ERROR )
|
||||||
{
|
{
|
||||||
/* XXX: needs to be replace with ber_stream_read() */
|
/* XXX: needs to be replace with ber_stream_read() */
|
||||||
(void)read(s, &ch, 1);
|
(void)!read(s, &ch, 1);
|
||||||
TRACE;
|
TRACE;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
@ -697,6 +697,7 @@ ldap_connect_to_host(LDAP *ld, Sockbuf *sb,
|
||||||
struct sockaddr_in6 ip6addr;
|
struct sockaddr_in6 ip6addr;
|
||||||
char bind_addr[INET6_ADDRSTRLEN];
|
char bind_addr[INET6_ADDRSTRLEN];
|
||||||
ip6addr.sin6_family = AF_INET6;
|
ip6addr.sin6_family = AF_INET6;
|
||||||
|
ip6addr.sin6_port = 0;
|
||||||
ip6addr.sin6_addr = ld->ld_options.ldo_local_ip_addrs.ip6_addr;
|
ip6addr.sin6_addr = ld->ld_options.ldo_local_ip_addrs.ip6_addr;
|
||||||
inet_ntop( AF_INET6,
|
inet_ntop( AF_INET6,
|
||||||
&(ip6addr.sin6_addr),
|
&(ip6addr.sin6_addr),
|
||||||
|
|
@ -725,6 +726,7 @@ ldap_connect_to_host(LDAP *ld, Sockbuf *sb,
|
||||||
struct sockaddr_in ip4addr;
|
struct sockaddr_in ip4addr;
|
||||||
char bind_addr[INET_ADDRSTRLEN];
|
char bind_addr[INET_ADDRSTRLEN];
|
||||||
ip4addr.sin_family = AF_INET;
|
ip4addr.sin_family = AF_INET;
|
||||||
|
ip4addr.sin_port = 0;
|
||||||
ip4addr.sin_addr = ld->ld_options.ldo_local_ip_addrs.ip4_addr;
|
ip4addr.sin_addr = ld->ld_options.ldo_local_ip_addrs.ip4_addr;
|
||||||
inet_ntop( AF_INET,
|
inet_ntop( AF_INET,
|
||||||
&(ip4addr.sin_addr),
|
&(ip4addr.sin_addr),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue