mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
More cleanup
This commit is contained in:
parent
ce96e57298
commit
577bfc477e
@ -1498,14 +1498,14 @@ int connection_read(ber_socket_t s)
|
||||
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,
|
||||
@ -1589,7 +1589,7 @@ int connection_read(ber_socket_t s)
|
||||
ldap_pvt_thread_mutex_unlock( MCA_GET_CONN_MUTEX(s) );
|
||||
|
||||
#ifdef SLAP_LIGHTWEIGHT_LISTENER
|
||||
slapd_resume( s );
|
||||
slapd_resume( s, 1 );
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
@ -1604,7 +1604,7 @@ int connection_read(ber_socket_t s)
|
||||
ldap_pvt_thread_mutex_unlock( MCA_GET_CONN_MUTEX(s) );
|
||||
|
||||
#ifdef SLAP_LIGHTWEIGHT_LISTENER
|
||||
slapd_resume( s );
|
||||
slapd_resume( s, 1 );
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
@ -1621,7 +1621,7 @@ int connection_read(ber_socket_t s)
|
||||
/* 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 );
|
||||
@ -1676,7 +1676,7 @@ int connection_read(ber_socket_t s)
|
||||
}
|
||||
|
||||
#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 ) ) {
|
||||
|
@ -584,7 +584,7 @@ int slapd_suspend(ber_socket_t s) {
|
||||
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 );
|
||||
@ -595,7 +595,7 @@ void slapd_resume ( ber_socket_t s ) {
|
||||
|
||||
ldap_pvt_thread_mutex_unlock( &slap_daemon.sd_mutex );
|
||||
|
||||
WAKE_LISTENER(1);
|
||||
WAKE_LISTENER(wake);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1364,13 +1364,14 @@ connection_accept(
|
||||
# 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();
|
||||
|
||||
|
@ -652,7 +652,9 @@ LDAP_SLAPD_F (const char *) connection_state2str LDAP_P(( int state ))
|
||||
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));
|
||||
@ -720,6 +722,11 @@ LDAP_SLAPD_F (RETSIGTYPE) slap_sig_shutdown LDAP_P((int sig));
|
||||
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));
|
||||
|
Loading…
Reference in New Issue
Block a user