]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Remove onion address usage in lookup_last_hid_serv_request
authorDavid Goulet <dgoulet@ev0ke.net>
Wed, 11 Mar 2015 17:43:07 +0000 (13:43 -0400)
committerDavid Goulet <dgoulet@ev0ke.net>
Tue, 21 Apr 2015 18:15:02 +0000 (14:15 -0400)
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
src/or/rendclient.c

index 14f311c1d5e108a7f3300a6c541209f392bc2e7e..af08494b9c53177b8ca97a14e3d2cdd25a43fc2c 100644 (file)
@@ -504,7 +504,6 @@ get_last_hid_serv_requests(void)
 static time_t
 lookup_last_hid_serv_request(routerstatus_t *hs_dir,
                              const char *desc_id_base32,
-                             const rend_data_t *rend_query,
                              time_t now, int set)
 {
   char hsdir_id_base32[REND_DESC_ID_V2_LEN_BASE32 + 1];
@@ -513,10 +512,9 @@ lookup_last_hid_serv_request(routerstatus_t *hs_dir,
   strmap_t *last_hid_serv_requests = get_last_hid_serv_requests();
   base32_encode(hsdir_id_base32, sizeof(hsdir_id_base32),
                 hs_dir->identity_digest, DIGEST_LEN);
-  tor_snprintf(hsdir_desc_comb_id, sizeof(hsdir_desc_comb_id), "%s%s%s",
+  tor_snprintf(hsdir_desc_comb_id, sizeof(hsdir_desc_comb_id), "%s%s",
                hsdir_id_base32,
-               desc_id_base32,
-               rend_query->onion_address);
+               desc_id_base32);
   /* XXX023 tor_assert(strlen(hsdir_desc_comb_id) ==
                        LAST_HID_SERV_REQUEST_KEY_LEN); */
   if (set) {
@@ -649,7 +647,7 @@ directory_get_from_hs_dir(const char *desc_id, const rend_data_t *rend_query)
 
   SMARTLIST_FOREACH(responsible_dirs, routerstatus_t *, dir, {
       time_t last = lookup_last_hid_serv_request(
-                            dir, desc_id_base32, rend_query, 0, 0);
+                            dir, desc_id_base32, 0, 0);
       const node_t *node = node_get_by_id(dir->identity_digest);
       if (last + REND_HID_SERV_DIR_REQUERY_PERIOD >= now ||
           !node || !node_has_descriptor(node)) {
@@ -684,7 +682,7 @@ directory_get_from_hs_dir(const char *desc_id, const rend_data_t *rend_query)
 
   /* Remember that we are requesting a descriptor from this hidden service
    * directory now. */
-  lookup_last_hid_serv_request(hs_dir, desc_id_base32, rend_query, now, 1);
+  lookup_last_hid_serv_request(hs_dir, desc_id_base32, now, 1);
 
   /* Encode descriptor cookie for logging purposes. */
   if (rend_query->auth_type != REND_NO_AUTH) {