/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 1998-2011 The OpenLDAP Foundation.
+ * Copyright 1998-2012 The OpenLDAP Foundation.
* Portions Copyright 2007 by Howard Chu, Symas Corporation.
* All rights reserved.
*
}
}
/* If event is a read */
- if ( SLAP_EVENT_IS_READ( i ))
+ if ( SLAP_EVENT_IS_READ( i )) {
r = 1;
- if ( r || !w ) {
Debug( LDAP_DEBUG_CONNS,
"daemon: read active on %d\n",
fd, 0, 0 );
- if ( r ) {
- SLAP_EVENT_CLR_READ( i );
- } else {
+ SLAP_EVENT_CLR_READ( i );
+ connection_read_activate( fd );
+ } else if ( !w ) {
#ifdef HAVE_EPOLL
- /* Don't keep reporting the hangup
- */
- if ( SLAP_SOCK_IS_ACTIVE( tid, fd )) {
- SLAP_EPOLL_SOCK_SET( tid, fd, EPOLLET );
- }
-#endif
+ /* Don't keep reporting the hangup
+ */
+ if ( SLAP_SOCK_IS_ACTIVE( tid, fd )) {
+ SLAP_EPOLL_SOCK_SET( tid, fd, EPOLLET );
}
- connection_read_activate( fd );
+#endif
}
}
}