]> git.sur5r.net Git - openldap/commitdiff
If we did gethostbyname, we need no further address manipulation.
authorJulio Sánchez Fernández <jsanchez@openldap.org>
Tue, 20 Jul 1999 11:26:44 +0000 (11:26 +0000)
committerJulio Sánchez Fernández <jsanchez@openldap.org>
Tue, 20 Jul 1999 11:26:44 +0000 (11:26 +0000)
servers/slapd/daemon.c

index 727cf6240906c0efdd219e466e30d9a816c5ddbe..3094ee77a1de26146aa48e5959e7647673984855 100644 (file)
@@ -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;
-                       }
                }
        }