Commit e5f68bcf authored by Ondřej Kuzník's avatar Ondřej Kuzník Committed by Ondřej Kuzník
Browse files

Option for response handling

parent 4ad8ecd4
......@@ -72,6 +72,8 @@ static char *logfileName;
ber_len_t sockbuf_max_incoming = SLAP_SB_MAX_INCOMING_DEFAULT;
ber_len_t sockbuf_max_incoming_auth = SLAP_SB_MAX_INCOMING_AUTH;
int slap_conn_max_pdus_per_cycle = SLAP_CONN_MAX_PDUS_PER_CYCLE_DEFAULT;
char *slapd_pid_file = NULL;
char *slapd_args_file = NULL;
......@@ -134,6 +136,7 @@ enum {
CFG_TLS_CACERT,
CFG_TLS_CERT,
CFG_TLS_KEY,
CFG_RESCOUNT,
CFG_LAST
};
......@@ -220,6 +223,10 @@ static ConfigTable config_back_cf_table[] = {
ARG_INT|ARG_MAGIC|CFG_THREADQS,
&config_generic,
},
{ "max_pdus_per_cycle", "count", 2, 2, 0,
ARG_INT|ARG_MAGIC|CFG_RESCOUNT,
&config_generic,
},
{ "TLSCACertificate", NULL, 2, 2, 0,
#ifdef HAVE_TLS
CFG_TLS_CACERT|ARG_BINARY|ARG_MAGIC,
......@@ -421,6 +428,16 @@ config_generic( ConfigArgs *c )
if ( logfile ) lutil_debug_file( logfile );
} break;
case CFG_RESCOUNT:
if ( c->value_int < 0 ) {
snprintf( c->cr_msg, sizeof(c->cr_msg),
"max_pdus_per_cycle=%d invalid", c->value_int );
Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->cr_msg );
return 1;
}
slap_conn_max_pdus_per_cycle = c->value_int;
break;
default:
Debug( LDAP_DEBUG_ANY, "%s: unknown CFG_TYPE %d.\n",
c->log, c->type );
......
......@@ -206,6 +206,7 @@ LDAP_SLAPD_F (int) slap_zn_wunlock( void *, void * );
LDAP_SLAPD_V (ber_len_t) sockbuf_max_incoming;
LDAP_SLAPD_V (ber_len_t) sockbuf_max_incoming_auth;
LDAP_SLAPD_V (int) slap_conn_max_pdus_per_cycle;
LDAP_SLAPD_V (slap_mask_t) global_allows;
LDAP_SLAPD_V (slap_mask_t) global_disallows;
......
......@@ -87,6 +87,8 @@ LDAP_BEGIN_DECL
#define SLAP_SB_MAX_INCOMING_DEFAULT ( ( 1 << 18 ) - 1 )
#define SLAP_SB_MAX_INCOMING_AUTH ( ( 1 << 24 ) - 1 )
#define SLAP_CONN_MAX_PDUS_PER_CYCLE_DEFAULT 10
#define SLAP_TEXT_BUFLEN ( 256 )
/* unknown config file directive */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment