From: Kurt Zeilenga Date: Wed, 24 Jan 2001 00:08:15 +0000 (+0000) Subject: Fix IP= port numbers X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~1533 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=fa21f7fe8624ccf8c9e94ec6b23d45b327234121;p=openldap Fix IP= port numbers --- diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index a3c45a9fe5..254b5d7494 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -729,8 +729,10 @@ static Listener * slap_open_listener( inet_ntop( AF_INET, &((struct sockaddr_in *)*sal)->sin_addr, addr, sizeof(addr) ); s = addr; + port = ((struct sockaddr_in *)*sal) ->sin_port; #else s = inet_ntoa( l.sl_addr.sin_addr ); + port = l.sl_addr.sin_port; #endif l.sl_name = ch_malloc( sizeof("IP=255.255.255.255:65535") ); sprintf( l.sl_name, "IP=%s:%d", @@ -742,6 +744,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; l.sl_name = ch_malloc( strlen(addr) + sizeof("IP= 65535") ); sprintf( l.sl_name, "IP=%s %d", addr, port ); } break;