ldap_pvt_thread_mutex_unlock( MCA_GET_CONN_MUTEX(s) );
#ifdef SLAP_LIGHTWEIGHT_LISTENER
- slapd_resume( s );
+ slapd_resume( s, 1 );
#endif
return 0;
}
if ( c->c_conn_state == SLAP_C_CLIENT ) {
#ifdef SLAP_LIGHTWEIGHT_LISTENER
- slapd_resume( s );
+ slapd_resume( s, 1 );
#endif
slapd_clr_read( s, 0 );
ldap_pvt_thread_pool_submit( &connection_pool,
ldap_pvt_thread_mutex_unlock( MCA_GET_CONN_MUTEX(s) );
#ifdef SLAP_LIGHTWEIGHT_LISTENER
- slapd_resume( s );
+ slapd_resume( s, 1 );
#endif
return 0;
}
ldap_pvt_thread_mutex_unlock( MCA_GET_CONN_MUTEX(s) );
#ifdef SLAP_LIGHTWEIGHT_LISTENER
- slapd_resume( s );
+ slapd_resume( s, 1 );
#endif
return 0;
}
/* connections_mutex and c_mutex are locked */
#ifdef SLAP_LIGHTWEIGHT_LISTENER
- slapd_resume( s );
+ slapd_resume( s, 1 );
#endif
connection_closing( c, "SASL layer install failure" );
connection_close( c );
}
#ifdef SLAP_LIGHTWEIGHT_LISTENER
- if ( need_resume ) slapd_resume( s );
+ if ( need_resume ) slapd_resume( s, 1 );
#endif
if ( ber_sockbuf_ctrl( c->c_sb, LBER_SB_OPT_NEEDS_READ, NULL ) ) {
return rc;
}
-void slapd_resume ( ber_socket_t s ) {
+void slapd_resume ( ber_socket_t s, int wake ) {
ldap_pvt_thread_mutex_lock( &slap_daemon.sd_mutex );
SLAP_SOCK_SET_READ( s );
ldap_pvt_thread_mutex_unlock( &slap_daemon.sd_mutex );
- WAKE_LISTENER(1);
+ WAKE_LISTENER(wake);
}
#endif
# endif /* LDAP_PF_LOCAL */
s = accept( sl->sl_sd, (struct sockaddr *) &from, &len );
+
#ifdef SLAP_LIGHTWEIGHT_LISTENER
- /*
- * As soon as a TCP connection is accepted, the listener FD is resumed
- * for concurrent-processing of incoming TCP connections.
+ /* Resume the listener FD to allow concurrent-processing of
+ * additional incoming connections.
*/
- slapd_resume( sl->sl_sd );
+ slapd_resume( sl->sl_sd, 1 );
#endif
+
if ( s == AC_SOCKET_INVALID ) {
int err = sock_errno();
LDAP_GCCATTR((const));
LDAP_SLAPD_F (int) connection_write LDAP_P((ber_socket_t s));
+
#ifdef SLAP_LIGHTWEIGHT_LISTENER
+LDAP_SLAPD_F (int) connection_read_activate LDAP_P((ber_socket_t s));
LDAP_SLAPD_F (int) connection_read LDAP_P((ber_socket_t, Operation **));
#else
LDAP_SLAPD_F (int) connection_read LDAP_P((ber_socket_t s));
LDAP_SLAPD_F (RETSIGTYPE) slap_sig_wake LDAP_P((int sig));
LDAP_SLAPD_F (void) slap_wake_listener LDAP_P((void));
+#ifdef SLAP_LIGHTWEIGHT_LISTENER
+LDAP_SLAPD_F (int) slapd_suspend LDAP_P((ber_socket_t s));
+LDAP_SLAPD_F (void) slapd_resume LDAP_P((ber_socket_t s, int wake ));
+#endif
+
LDAP_SLAPD_F (void) slapd_set_write LDAP_P((ber_socket_t s, int wake));
LDAP_SLAPD_F (void) slapd_clr_write LDAP_P((ber_socket_t s, int wake));
LDAP_SLAPD_F (void) slapd_set_read LDAP_P((ber_socket_t s, int wake));