Sfoglia il codice sorgente

start using new renddesc code

svn:r4769
Nick Mathewson 19 anni fa
parent
commit
21959c1bfd
2 ha cambiato i file con 5 aggiunte e 9 eliminazioni
  1. 3 5
      src/or/directory.c
  2. 2 4
      src/or/rendservice.c

+ 3 - 5
src/or/directory.c

@@ -433,11 +433,9 @@ directory_send_command(connection_t *conn, const char *platform,
       strlcpy(conn->rend_query, resource, sizeof(conn->rend_query));
 
       httpcommand = "GET";
-      tor_snprintf(url, sizeof(url), "/tor/rendezvous/%s", resource);
-      /* XXXX011 Once directories understand versioned descriptors, switch to this
-       * URL in order to get the most recent version */
-      // tor_snprintf(url, sizeof(url), "/tor/rendezvous1/%s", resource);
-
+      /* Request the most recent versioned descriptor. */
+      tor_snprintf(url, sizeof(url), "/tor/rendezvous1/%s", resource);
+      //tor_snprintf(url, sizeof(url), "/tor/rendezvous/%s", resource);
       break;
     case DIR_PURPOSE_UPLOAD_RENDDESC:
       tor_assert(!resource);

+ 2 - 4
src/or/rendservice.c

@@ -1017,11 +1017,9 @@ rend_consider_services_upload(time_t now)
          service->desc_is_dirty < now-5)) {
       /* if it's time, or if the directory servers have a wrong service
        * descriptor and ours has been stable for 5 seconds, upload a
-       * new one. */
+       * new one of each format. */
       upload_service_descriptor(service, 0);
-      /* XXXX011 NM Once directories understand versioned descriptors, enable
-       * this. */
-      // upload_service_descriptor(service, 1);
+      upload_service_descriptor(service, 1);
       service->next_upload_time = now + rendpostperiod;
     }
   }