summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-15 19:14:23 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-15 19:14:23 +0000
commit4ed52553b0ccf4db05bfe213a26df69ac3a588d2 (patch)
treec1f422b90d86ec71639bdc67e8d73a9a2c49c40f
parent486097e27b7fc848a6abfc25c7e4547e4acf5a7b (diff)
Added readtimeout directive to options block in new config.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1713 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r--data/example_new.conf5
-rw-r--r--include/extern.h2
-rw-r--r--src/config.c5
3 files changed, 8 insertions, 4 deletions
diff --git a/data/example_new.conf b/data/example_new.conf
index 03c6fb0d0..0b016e4a7 100644
--- a/data/example_new.conf
+++ b/data/example_new.conf
@@ -308,6 +308,11 @@ options {
* this timer.
*/
expiretimeout = 30m
+
+ /*
+ * Sets the timout period for reading from the uplink.
+ */
+ readtimeout = 5s
}
/*
diff --git a/include/extern.h b/include/extern.h
index 0d558ec7b..c8627b7bc 100644
--- a/include/extern.h
+++ b/include/extern.h
@@ -289,7 +289,7 @@ E int BadPassLimit;
E time_t BadPassTimeout;
E time_t UpdateTimeout;
E time_t ExpireTimeout;
-E int ReadTimeout;
+E time_t ReadTimeout;
E int WarningTimeout;
E int TimeoutCheck;
E int KeepLogs;
diff --git a/src/config.c b/src/config.c
index c1b9ff204..a3bbe92b4 100644
--- a/src/config.c
+++ b/src/config.c
@@ -91,7 +91,7 @@ int BadPassLimit;
time_t BadPassTimeout;
time_t UpdateTimeout;
time_t ExpireTimeout;
-int ReadTimeout;
+time_t ReadTimeout;
int WarningTimeout;
int TimeoutCheck;
int KeepLogs;
@@ -644,6 +644,7 @@ int ServerConfig::Read(bool bail)
{"options", "badpasstimeout", "0", new ValueContainerTime(&BadPassTimeout), DT_TIME, NoValidation},
{"options", "updatetimeout", "0", new ValueContainerTime(&UpdateTimeout), DT_TIME, ValidateNotZero},
{"options", "expiretimeout", "0", new ValueContainerTime(&ExpireTimeout), DT_TIME, ValidateNotZero},
+ {"options", "readtimeout", "0", new ValueContainerTime(&ReadTimeout), DT_TIME, ValidateNotZero},
{"nickserv", "nick", "NickServ", new ValueContainerChar(&s_NickServ), DT_CHARPTR | DT_NORELOAD, ValidateNotEmpty},
{"nickserv", "description", "Nickname Registration Service", new ValueContainerChar(&desc_NickServ), DT_CHARPTR | DT_NORELOAD, ValidateNotEmpty},
{"nickserv", "database", "nick.db", new ValueContainerChar(&NickDBName), DT_CHARPTR, ValidateNotEmpty},
@@ -1374,7 +1375,6 @@ Directive directives[] = {
{"ModuleAutoload", {{PARAM_STRING, PARAM_RELOAD, &Modules}}},
{"NewsCount", {{PARAM_POSINT, PARAM_RELOAD, &NewsCount}}},
{"NickRegDelay", {{PARAM_POSINT, PARAM_RELOAD, &NickRegDelay}}},
- {"ReadTimeout", {{PARAM_TIME, PARAM_RELOAD, &ReadTimeout}}},
{"RemoteServer2", {{PARAM_STRING, 0, &RemoteServer2},
{PARAM_PORT, 0, &RemotePort2},
{PARAM_STRING, 0, &RemotePassword2}}},
@@ -1701,7 +1701,6 @@ int read_config(int reload)
}
}
- CHECK(ReadTimeout);
CHECK(WarningTimeout);
CHECK(TimeoutCheck);