]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/daemon.c
allow empty modlist
[openldap] / servers / slapd / daemon.c
index b1724ed3a140502547e7dcbdbf4582746a85e33b..4f6875ff78ef79ebd5db8ba05065a56aa4ca3367 100644 (file)
@@ -1157,6 +1157,8 @@ int slapd_daemon_init( const char *urls )
        if( u == NULL || u[0] == NULL ) {
                Debug( LDAP_DEBUG_ANY, "daemon_init: no urls (%s) provided.\n",
                        urls, 0, 0 );
+               if ( u )
+                       ldap_charray_free( u );
                return -1;
        }
 
@@ -1977,9 +1979,6 @@ slapd_daemon_task(
                                "daemon: write active on %d\n",
                                wd, 0, 0 );
 
-#ifdef SLAP_LIGHTWEIGHT_DISPATCHER
-                       connection_write_activate( wd );
-#else
                        /*
                         * NOTE: it is possible that the connection was closed
                         * and that the stream is now inactive.
@@ -1995,7 +1994,6 @@ slapd_daemon_task(
                                        nrfds--;
                                }
                        }
-#endif
                }
 
                for ( i = 0; nrfds > 0; i++ ) {
@@ -2103,9 +2101,6 @@ slapd_daemon_task(
 
                                        waswrite = 1;
 
-#ifdef SLAP_LIGHTWEIGHT_DISPATCHER
-                                       connection_write_activate( fd );
-#else
                                        /*
                                         * NOTE: it is possible that the connection was closed
                                         * and that the stream is now inactive.
@@ -2115,7 +2110,6 @@ slapd_daemon_task(
                                        if ( connection_write( fd ) < 0 ) {
                                                continue;
                                        }
-#endif
                                }
                                /* If event is a read or an error */
                                if( SLAP_EVENT_IS_READ( i ) || !waswrite ) {