]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/daemon.c
Backout the input exhaustion change, it loops. Still looking for
[openldap] / servers / slapd / daemon.c
index 596233e827354552eaa8e3ce0a30ed5ee71812e1..a007fa1f5e8976536ee454fd65abd419820ceae4 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;
-                       }
                }
        }
 
@@ -849,7 +845,7 @@ slapd_daemon_task(
 #endif
 
                        for ( l = 0; slap_listeners[l] != NULL; l++ ) {
-                               if ( i == slap_listeners[l]->sl_sd ) {
+                               if ( rd == slap_listeners[l]->sl_sd ) {
                                        is_listener = 1;
                                        break;
                                }
@@ -868,9 +864,7 @@ slapd_daemon_task(
                         * active.
                         */
 
-                       while ( ( rc = connection_read( rd ) ) > 0 )
-                               ;
-                       if ( rc < 0 ) {
+                       if ( connection_read( rd ) < 0 ) {
                                slapd_close( rd );
                        }
                }
@@ -1048,7 +1042,6 @@ slap_set_shutdown( int sig )
                ldap_pvt_thread_kill( listener_tid, LDAP_SIGUSR1 );
        }
 #else
-       Debug( LDAP_DEBUG_TRACE, "Shutdown %d ordered", sig, 0, 0 );
        /* trying to "hit" the socket seems to always get a */
        /* EWOULDBLOCK error, so just close the listen socket to */
        /* break out of the select since we're shutting down anyway */