summaryrefslogtreecommitdiff
path: root/src/or/directory.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-11-05 19:23:57 +0000
committerNick Mathewson <nickm@torproject.org>2007-11-05 19:23:57 +0000
commit42f7ae3eaeb3d0f1067234f3acf9c0f0f4e6cf1a (patch)
tree037ca463c31abe2bd69823238ae1c6e278fe283a /src/or/directory.c
parentdec5fcd611e9865a4751379035c2bad4e57eb5e8 (diff)
downloadtor-42f7ae3eaeb3d0f1067234f3acf9c0f0f4e6cf1a.tar.gz
tor-42f7ae3eaeb3d0f1067234f3acf9c0f0f4e6cf1a.zip
r16435@catbus: nickm | 2007-11-05 14:23:07 -0500
Patch from karsten: tidy up v2 hidden service directory logic, and fix a few bugs. svn:r12388
Diffstat (limited to 'src/or/directory.c')
-rw-r--r--src/or/directory.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index 703cb55bca..b2b15cc4bb 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -3131,9 +3131,10 @@ directory_post_to_hs_dir(smartlist_t *desc_ids, smartlist_t *desc_strs,
hs_dir = smartlist_get(responsible_dirs, j);
/* Send publish request. */
directory_initiate_command_routerstatus(hs_dir,
- DIR_PURPOSE_UPLOAD_RENDDESC_V2,
- ROUTER_PURPOSE_GENERAL,
- 1, NULL, desc_str, strlen(desc_str), 0);
+ DIR_PURPOSE_UPLOAD_RENDDESC_V2,
+ ROUTER_PURPOSE_GENERAL,
+ 1, NULL, desc_str,
+ strlen(desc_str), 0);
base32_encode(desc_id_base32, sizeof(desc_id_base32),
desc_id, DIGEST_LEN);
log_info(LD_REND, "Sending publish request for v2 descriptor for "
@@ -3181,15 +3182,13 @@ directory_get_from_hs_dir(const char *desc_id, const char *query)
base32_encode(desc_id_base32, sizeof(desc_id_base32),
desc_id, DIGEST_LEN);
/* Send fetch request. */
- directory_initiate_command_routerstatus(
- hs_dir,
- DIR_PURPOSE_FETCH_RENDDESC_V2,
- ROUTER_PURPOSE_GENERAL,
- 1, desc_id_base32, NULL, 0, 0);
+ directory_initiate_command_routerstatus(hs_dir,
+ DIR_PURPOSE_FETCH_RENDDESC_V2,
+ ROUTER_PURPOSE_GENERAL,
+ 1, desc_id_base32, NULL, 0, 0);
log_info(LD_REND, "Sending fetch request for v2 descriptor for "
"service '%s' with descriptor ID '%s' to hidden "
"service directory '%s' on port %d.",
query, desc_id_base32, hs_dir->nickname, hs_dir->dir_port);
- smartlist_free(responsible_dirs);
}