diff options
author | Roger Dingledine <arma@torproject.org> | 2004-11-09 01:24:10 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-11-09 01:24:10 +0000 |
commit | 8c7b2ff7eda913e8c09d5dfc7d522dd8725810bb (patch) | |
tree | 0d3d32328c269b050b1757eb43b8e6cf38a8314b /src | |
parent | cb5de85585c8084dd515baa351cb5d628adefcd1 (diff) | |
download | tor-8c7b2ff7eda913e8c09d5dfc7d522dd8725810bb.tar.gz tor-8c7b2ff7eda913e8c09d5dfc7d522dd8725810bb.zip |
various fixes
svn:r2712
Diffstat (limited to 'src')
-rw-r--r-- | src/common/compat.c | 2 | ||||
-rw-r--r-- | src/common/log.c | 2 | ||||
-rw-r--r-- | src/common/util.c | 1 | ||||
-rw-r--r-- | src/or/config.c | 11 | ||||
-rw-r--r-- | src/or/control.c | 4 | ||||
-rw-r--r-- | src/or/hibernate.c | 1 |
6 files changed, 12 insertions, 9 deletions
diff --git a/src/common/compat.c b/src/common/compat.c index 7ecc6d9b4d..c9842b98d6 100644 --- a/src/common/compat.c +++ b/src/common/compat.c @@ -69,7 +69,7 @@ #include "log.h" #include "util.h" -/* Inline the strl functions if the plaform doesn't have them. */ +/* Inline the strl functions if the platform doesn't have them. */ #ifndef HAVE_STRLCPY #include "strlcpy.c" #endif diff --git a/src/common/log.c b/src/common/log.c index 569d6b2fa2..c61d0a5d4a 100644 --- a/src/common/log.c +++ b/src/common/log.c @@ -367,7 +367,7 @@ int add_syslog_log(int loglevelMin, int loglevelMax) { logfile_t *lf; if (syslog_count++ == 0) - /* This is the the first syslog. */ + /* This is the first syslog. */ openlog("Tor", LOG_NDELAY, LOG_DAEMON); lf = tor_malloc_zero(sizeof(logfile_t)); diff --git a/src/common/util.c b/src/common/util.c index fbe0902ce8..292b7cfd5b 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -34,7 +34,6 @@ #include <string.h> #include <assert.h> - #ifdef HAVE_NETINET_IN_H #include <netinet/in.h> #endif diff --git a/src/or/config.c b/src/or/config.c index 7f2d7d101b..e5916f1f49 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -191,9 +191,9 @@ get_options(void) { return global_options; } -/** Change the current global options tocontain <b>new</b> instead of - * their current value; free the old value as necessary. Where - * <b>new</b> is different from the old value, update the process to +/** Change the current global options to contain <b>new_val</b> instead + * of their current value; free the old value as necessary. Where + * <b>new_val</b> is different from the old value, update the process to * use the new value instead. * * Note 1: <b>new_val</b> must have previously been validated with @@ -1040,6 +1040,11 @@ options_validate(or_options_t *options) result = -1; } + if (2*options->BandwidthRateBytes >= options->BandwidthBurstBytes) { + log(LOG_WARN,"BandwidthBurstBytes must be more than twice BandwidthRateBytes."); + result = -1; + } + if (options->AccountingStart < 0 || options->AccountingStart > 31) { log(LOG_WARN,"Monthly accounting must start on a day of the month, and no months have %d days.", options->AccountingStart); diff --git a/src/or/control.c b/src/or/control.c index 1502557a14..e0d0360d05 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -51,7 +51,7 @@ #define ERR_UNAUTHORIZED 0x0007 #define ERR_REJECTED_AUTHENTICATION 0x0008 -/* Recongized asynchonous event types. */ +/* Recognized asynchronous event types. */ #define _EVENT_MIN 0x0001 #define EVENT_CIRCUIT_STATUS 0x0001 #define EVENT_STREAM_STATUS 0x0002 @@ -77,7 +77,7 @@ static const char * CONTROL_COMMANDS[] = { /** Bitfield: The bit 1<<e is set if <b>any</b> open control * connection is interested in events of type <b>e</b>. We use this * so that we can decide to skip generating event messages that nobody - * is interest in without having to walk over the global connection + * has interest in without having to walk over the global connection * list to find out. **/ static uint32_t global_event_mask = 0; diff --git a/src/or/hibernate.c b/src/or/hibernate.c index 7a983d81ee..102d4dc9fc 100644 --- a/src/or/hibernate.c +++ b/src/or/hibernate.c @@ -545,7 +545,6 @@ hibernate_end_time_elapsed(time_t now) * to start/stop hibernating. */ void consider_hibernation(time_t now) { - connection_t *conn; /* If we're in 'exiting' mode, then we just shutdown after the interval * elapses. */ |