diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-03-12 22:48:18 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-03-12 22:48:18 +0000 |
commit | 474c60b7433da2302c35832571f41867714d8f65 (patch) | |
tree | 630b53f7fdd65de04d7a8735262221f5d419bf4a /src/or/or.h | |
parent | b67a5ba49801a0a4e190036a30cd0b3d622de9ef (diff) | |
download | tor-474c60b7433da2302c35832571f41867714d8f65.tar tor-474c60b7433da2302c35832571f41867714d8f65.tar.gz |
Cleanup on time-relaqted constants. New conventions:
1) Surround all constants by (parens), whether we'll be using them
in a denominator or not.
2) Express all time periods as products (24*60*60), not as multiplied-out
constants (86400).
3) Comments like "(60*60) /* one hour */" are as pointless as comments
like "c = a + b; /* set c to the sum of a and b */". Remove them.
4) All time periods should be #defined constants, not given inline.
5) All time periods should have doxygen comments.
6) All time periods, unless specified, are in seconds. It's not necessary
to say so.
To summarize, the old (lack of) style would allow:
#define FOO_RETRY_INTERVAL 60*60 /* one hour (seconds) */
next_try = now + 3600;
The new style is:
/** How often do we reattempt foo? */
#define FOO_RETRY_INTERVAL (60*60)
next_try = now + RETRY_INTERVAL;
svn:r6142
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/or.h b/src/or/or.h index bd9bdc013..e436e064f 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -187,9 +187,9 @@ #endif /** How often do we rotate onion keys? */ -#define MIN_ONION_KEY_LIFETIME (7*24*60*60) /* once a week */ +#define MIN_ONION_KEY_LIFETIME (7*24*60*60) /** How often do we rotate TLS contexts? */ -#define MAX_SSL_KEY_LIFETIME (120*60) +#define MAX_SSL_KEY_LIFETIME (2*60*60) /** How old do we allow a router to get before removing it * from the router list? In seconds. */ @@ -532,7 +532,7 @@ typedef enum { #define CELL_CREATED_FAST 6 /** How long to test reachability before complaining to the user. */ -#define TIMEOUT_UNTIL_UNREACHABILITY_COMPLAINT (20*60) /* 20 minutes */ +#define TIMEOUT_UNTIL_UNREACHABILITY_COMPLAINT (20*60) /* people behind fascist firewalls use only these ports */ #define REQUIRED_FIREWALL_DIRPORT 80 |