aboutsummaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 1b3fa09bac..6ae4be189d 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -112,6 +112,8 @@ static config_var_t config_vars[] = {
OBSOLETE("LinkPadding"),
VAR("MaxConn", UINT, MaxConn),
VAR("MaxOnionsPending", UINT, MaxOnionsPending),
+ VAR("MonthlyAccountingStart",UINT, AccountingStart),
+ VAR("AccountingMaxKB", UINT, AccountingMaxKB),
VAR("Nickname", STRING, Nickname),
VAR("NewCircuitPeriod", UINT, NewCircuitPeriod),
VAR("NumCpus", UINT, NumCpus),
@@ -384,7 +386,7 @@ config_assign(or_options_t *options, struct config_line_t *list)
return -1;
list = list->next;
}
-
+
return 0;
}
@@ -962,6 +964,15 @@ getconfig(int argc, char **argv, or_options_t *options)
result = -1;
}
+ if (options->AccountingStart < 0 || options->AccountingStart > 31) {
+ log(LOG_WARN,"Monthy accounting must start on a day of the month, and no months have %d days.",
+ options->AccountingStart);
+ result = -1;
+ } else if (options->AccountingStart > 28) {
+ log(LOG_WARN,"Not every month has %d days.",options->AccountingStart);
+ result = -1;
+ }
+
if (options->HttpProxy) { /* parse it now */
if (parse_addr_port(options->HttpProxy, NULL,
&options->HttpProxyAddr, &options->HttpProxyPort) < 0) {