Turn DEFAULT_IF_MODIFIED_SINCE_DELAY into a const

This commit is contained in:
Nick Mathewson 2017-05-04 08:24:14 -04:00
parent 8dd1028aa2
commit a8eccb6363

View File

@ -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. */