aboutsummaryrefslogtreecommitdiff
path: root/src/or/rendcommon.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-03-12 22:48:18 +0000
committerNick Mathewson <nickm@torproject.org>2006-03-12 22:48:18 +0000
commit474c60b7433da2302c35832571f41867714d8f65 (patch)
tree630b53f7fdd65de04d7a8735262221f5d419bf4a /src/or/rendcommon.c
parentb67a5ba49801a0a4e190036a30cd0b3d622de9ef (diff)
downloadtor-474c60b7433da2302c35832571f41867714d8f65.tar.gz
tor-474c60b7433da2302c35832571f41867714d8f65.zip
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/rendcommon.c')
-rw-r--r--src/or/rendcommon.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/rendcommon.c b/src/or/rendcommon.c
index a4ba39f598..0b66bc7a3c 100644
--- a/src/or/rendcommon.c
+++ b/src/or/rendcommon.c
@@ -231,7 +231,11 @@ rend_get_service_id(crypto_pk_env_t *pk, char *out)
/* ==== Rendezvous service descriptor cache. */
+/** How old do we let hidden service descriptors get discarding them as too
+ * old? */
#define REND_CACHE_MAX_AGE (48*60*60)
+/** How wrong to we assume our clock may be when checking whether hidden
+ * services are too old or too new? */
#define REND_CACHE_MAX_SKEW (24*60*60)
/** Map from service id (as generated by rend_get_service_id) to