#include "ldap_rq.h"
-#undef HAVE_EPOLL
-
#if defined(HAVE_SYS_EPOLL_H) && defined(HAVE_EPOLL)
#include <sys/epoll.h>
#endif
ber_socket_t i;
int ns, nwriters;
int at;
- ber_socket_t nfds, nrfds, nwfds;
+ ber_socket_t nfds;
+#if SLAP_EVENTS_ARE_INDEXED
+ ber_socket_t nrfds, nwfds;
+#endif
#define SLAPD_EBADF_LIMIT 16
time_t now;
if ( !SLAP_EVENT_IS_READ( slap_listeners[l]->sl_sd ))
continue;
- ns--;
-
rc = slapd_handle_listener(slap_listeners[l]);
#ifdef LDAP_CONNECTIONLESS
if ( rc ) continue;
#endif
+ ns--;
+
/* Don't need to look at this in the data loops */
SLAP_EVENT_CLR_READ( slap_listeners[l]->sl_sd );
SLAP_EVENT_CLR_WRITE( slap_listeners[l]->sl_sd );
#endif
) continue;
+ /* Don't log internal wake events */
+ if ( SLAP_EVENT_FD( i ) == wake_sds[0] )
+ continue;
+
r = SLAP_EVENT_IS_READ( i );
w = SLAP_EVENT_IS_WRITE( i );
if ( r || w ) {
if ( rc ) {
fd = SLAP_EVENT_FD( i );
+ /* Ignore wake events, they were handled above */
+ if ( fd == wake_sds[0] )
+ continue;
+
if( SLAP_EVENT_IS_WRITE( i ) ) {
Debug( LDAP_DEBUG_CONNS,
"daemon: write active on %d\n",