aboutsummaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-02-22 23:52:44 +0000
committerRoger Dingledine <arma@torproject.org>2005-02-22 23:52:44 +0000
commit55c3f15ed1334fc4f63e04c4edc4bb2340623fac (patch)
tree73f97c3898cbcb049bb50d895c4260925ae22b64 /src/or/config.c
parent6e6d95b3db091d4ae107c8d4f03354ccadd20757 (diff)
downloadtor-55c3f15ed1334fc4f63e04c4edc4bb2340623fac.tar
tor-55c3f15ed1334fc4f63e04c4edc4bb2340623fac.tar.gz
Forward-port the trick to bump up ConnLimit as far as it can
go, but not past MAXCONNECTIONS. Also throw away the FAKE_POLL caveats since 0.1.0 doesn't need it any more. svn:r3657
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 2e69de260..7fa6fe853 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -64,6 +64,7 @@ static config_abbrev_t config_abbrevs[] = {
{ "BandwidthRateBytes", "BandwidthRate", 0},
{ "BandwidthBurstBytes", "BandwidthBurst", 0},
{ "DirFetchPostPeriod", "StatusFetchPeriod", 0},
+ { "MaxConn", "ConnLimit", 0},
{ NULL, NULL , 0},
};
#undef PLURAL
@@ -141,7 +142,7 @@ static config_var_t config_vars[] = {
VAR("LogLevel", LINELIST_S, OldLogOptions, NULL),
VAR("LogFile", LINELIST_S, OldLogOptions, NULL),
OBSOLETE("LinkPadding"),
- VAR("MaxConn", UINT, MaxConn, "1024"),
+ VAR("ConnLimit", UINT, ConnLimit, "1024"),
VAR("MaxOnionsPending", UINT, MaxOnionsPending, "100"),
VAR("MonthlyAccountingStart",UINT, _MonthlyAccountingStart,"0"),
VAR("AccountingMaxKB", UINT, _AccountingMaxKB, "0"),
@@ -312,7 +313,9 @@ options_act(void) {
close_temp_logs();
add_callback_log(LOG_NOTICE, LOG_ERR, control_event_logmsg);
- if (set_max_file_descriptors(options->MaxConn) < 0)
+ options->_ConnLimit =
+ set_max_file_descriptors(options->ConnLimit, MAXCONNECTIONS);
+ if (options->_ConnLimit < 0)
return -1;
{
@@ -1345,16 +1348,6 @@ options_validate(or_options_t *options)
result = -1;
}
- if (options->MaxConn < 1) {
- log(LOG_WARN, "MaxConn option must be a non-zero positive integer.");
- result = -1;
- }
-
- if (options->MaxConn > MAXCONNECTIONS) {
- log(LOG_WARN, "MaxConn option must be at most %d.", MAXCONNECTIONS);
- result = -1;
- }
-
#define MIN_DIR_FETCH_PERIOD 600
#define MIN_DIR_POST_PERIOD 300
#define MIN_REND_POST_PERIOD 300