Browse Source

Turn DEFAULT_IF_MODIFIED_SINCE_DELAY into a const

Nick Mathewson 8 years ago
parent
commit
a8eccb6363
1 changed files with 5 additions and 4 deletions
  1. 5 4
      src/or/directory.c

+ 5 - 4
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];
   uint8_t or_diff_from[DIGEST256_LEN];
   int or_diff_from_is_set = 0;
   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;
   int flav = FLAV_NS;
   if (resource)
   if (resource)
     flav = networkstatus_parse_flavor_name(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 (flav != -1) {
     /* IF we have a parsed consensus of this type, we can do an
     /* IF we have a parsed consensus of this type, we can do an
      * if-modified-time based on it. */
      * if-modified-time based on it. */