mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-03 20:40:05 -05:00
Fix ITS#1615
This commit is contained in:
parent
08d0a48ac5
commit
f0a453dfca
1 changed files with 2 additions and 2 deletions
|
|
@ -897,7 +897,7 @@ static Listener * slap_open_listener(
|
|||
#else
|
||||
s = inet_ntoa( ((struct sockaddr_in *) *sal)->sin_addr );
|
||||
#endif
|
||||
port = ((struct sockaddr_in *)*sal) ->sin_port;
|
||||
port = ntohs( ((struct sockaddr_in *)*sal) ->sin_port );
|
||||
l.sl_name = ch_malloc( sizeof("IP=255.255.255.255:65535") );
|
||||
sprintf( l.sl_name, "IP=%s:%d",
|
||||
s != NULL ? s : "unknown" , port );
|
||||
|
|
@ -908,7 +908,7 @@ static Listener * slap_open_listener(
|
|||
char addr[INET6_ADDRSTRLEN];
|
||||
inet_ntop( AF_INET6, &((struct sockaddr_in6 *)*sal)->sin6_addr,
|
||||
addr, sizeof addr);
|
||||
port = ((struct sockaddr_in6 *)*sal)->sin6_port;
|
||||
port = ntohs( ((struct sockaddr_in6 *)*sal)->sin6_port );
|
||||
l.sl_name = ch_malloc( strlen(addr) + sizeof("IP= 65535") );
|
||||
sprintf( l.sl_name, "IP=%s %d", addr, port );
|
||||
} break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue