|
|
@@ -259,6 +259,7 @@ slapi_onoff_t init_return_orig_type;
|
|
|
slapi_onoff_t init_enable_turbo_mode;
|
|
|
slapi_onoff_t init_connection_nocanon;
|
|
|
slapi_int_t init_connection_buffer;
|
|
|
+slapi_int_t init_listen_backlog_size;
|
|
|
#ifdef MEMPOOL_EXPERIMENTAL
|
|
|
slapi_onoff_t init_mempool_switch;
|
|
|
#endif
|
|
|
@@ -1057,7 +1058,11 @@ static struct config_get_and_set {
|
|
|
{CONFIG_CONNECTION_NOCANON, config_set_connection_nocanon,
|
|
|
NULL, 0,
|
|
|
(void**)&global_slapdFrontendConfig.connection_nocanon,
|
|
|
- CONFIG_ON_OFF, (ConfigGetFunc)config_get_connection_nocanon, &init_connection_nocanon}
|
|
|
+ CONFIG_ON_OFF, (ConfigGetFunc)config_get_connection_nocanon, &init_connection_nocanon},
|
|
|
+ {CONFIG_LISTEN_BACKLOG_SIZE, config_set_listen_backlog_size,
|
|
|
+ NULL, 0,
|
|
|
+ (void**)&global_slapdFrontendConfig.listen_backlog_size, CONFIG_INT,
|
|
|
+ (ConfigGetFunc)config_get_listen_backlog_size, &init_listen_backlog_size}
|
|
|
#ifdef MEMPOOL_EXPERIMENTAL
|
|
|
,{CONFIG_MEMPOOL_SWITCH_ATTRIBUTE, config_set_mempool_switch,
|
|
|
NULL, 0,
|
|
|
@@ -1499,6 +1504,7 @@ FrontendConfig_init () {
|
|
|
init_connection_buffer = cfg->connection_buffer = CONNECTION_BUFFER_ON;
|
|
|
init_connection_nocanon = cfg->connection_nocanon = LDAP_ON;
|
|
|
|
|
|
+ init_listen_backlog_size = cfg->listen_backlog_size = DAEMON_LISTEN_SIZE;
|
|
|
#ifdef MEMPOOL_EXPERIMENTAL
|
|
|
init_mempool_switch = cfg->mempool_switch = LDAP_ON;
|
|
|
cfg->mempool_maxfreelist = 1024;
|
|
|
@@ -7024,6 +7030,32 @@ config_set_connection_buffer( const char *attrname, char *value,
|
|
|
return retVal;
|
|
|
}
|
|
|
|
|
|
+int
|
|
|
+config_set_listen_backlog_size( const char *attrname, char *value,
|
|
|
+ char *errorbuf, int apply )
|
|
|
+{
|
|
|
+ slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
|
|
|
+
|
|
|
+ if ( config_value_is_null( attrname, value, errorbuf, 0 )) {
|
|
|
+ return LDAP_OPERATIONS_ERROR;
|
|
|
+ }
|
|
|
+
|
|
|
+ if ( apply ) {
|
|
|
+ PR_AtomicSet(&slapdFrontendConfig->listen_backlog_size, atoi(value));
|
|
|
+ }
|
|
|
+ return LDAP_SUCCESS;
|
|
|
+}
|
|
|
+
|
|
|
+int
|
|
|
+config_get_listen_backlog_size()
|
|
|
+{
|
|
|
+ slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
|
|
|
+ int retVal;
|
|
|
+
|
|
|
+ retVal = slapdFrontendConfig->listen_backlog_size;
|
|
|
+ return retVal;
|
|
|
+}
|
|
|
+
|
|
|
/*
|
|
|
* This function is intended to be used from the dse code modify callback. It
|
|
|
* is "optimized" for that case because it takes a berval** of values, which is
|