From 535cc3442198514ac262673c3012a092e80c6a7b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Julio=20S=C3=A1nchez=20Fern=C3=A1ndez?= Date: Tue, 20 Jul 1999 11:26:44 +0000 Subject: [PATCH] If we did gethostbyname, we need no further address manipulation. --- servers/slapd/daemon.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index 727cf62409..3094ee77a1 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -271,16 +271,12 @@ open_listener( } #ifdef HAVE_WINSOCK - if(!(l.sl_addr.sin_addr.S_un.S_addr = inet_addr(he->h_addr))) + memcpy( &l.sl_addr.sin_addr.S_un.S_addr, he->h_addr, + sizeof( l.sl_addr.sin_addr.S_un.S_addr ) ); #else - if(!inet_aton(he->h_addr, &l.sl_addr.sin_addr)) + memcpy( &l.sl_addr.sin_addr, he->h_addr, + sizeof( l.sl_addr.sin_addr ) ); #endif - { - Debug( LDAP_DEBUG_ANY, "%s has invalid address (%s) in URL: %s", - lud->lud_host, he->h_addr, url ); - ldap_free_urldesc( lud ); - return NULL; - } } } -- 2.39.5