diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-05-04 08:24:14 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-05-04 08:37:41 -0400 |
commit | a8eccb6363ff02d4c59526a4daace96f71ff01c8 (patch) | |
tree | 129405038b8d63c6d2d68ed3f7dbbd026fbc83c6 /src/or | |
parent | 8dd1028aa2788cbd3bbb960ed8eaee7cda7c22c7 (diff) | |
download | tor-a8eccb6363ff02d4c59526a4daace96f71ff01c8.tar.gz tor-a8eccb6363ff02d4c59526a4daace96f71ff01c8.zip |
Turn DEFAULT_IF_MODIFIED_SINCE_DELAY into a const
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/directory.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/or/directory.c b/src/or/directory.c index bf963f1187..1b377431a2 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -493,14 +493,15 @@ dir_consensus_request_set_additional_headers(directory_request_t *req, uint8_t or_diff_from[DIGEST256_LEN]; int or_diff_from_is_set = 0; + /* DEFAULT_IF_MODIFIED_SINCE_DELAY is 1/20 of the default consensus + * period of 1 hour. + */ + const int DEFAULT_IF_MODIFIED_SINCE_DELAY = 180; + int flav = FLAV_NS; if (resource) flav = networkstatus_parse_flavor_name(resource); - /* DEFAULT_IF_MODIFIED_SINCE_DELAY is 1/20 of the default consensus - * period of 1 hour. - */ -#define DEFAULT_IF_MODIFIED_SINCE_DELAY (180) if (flav != -1) { /* IF we have a parsed consensus of this type, we can do an * if-modified-time based on it. */ |