aboutsummaryrefslogtreecommitdiff
path: root/src/or/rendservice.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/rendservice.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/rendservice.c')
-rw-r--r--src/or/rendservice.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index 0b9ec22357..f757ca5dd5 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -1100,8 +1100,7 @@ upload_service_descriptor(rend_service_t *service)
/* Upload v2 descriptor? */
if (service->descriptor_versions & (1 << 2) &&
get_options()->PublishHidServDescriptors) {
- smartlist_t *hs_dirs = hid_serv_create_routing_table_st();
- if (hid_serv_have_enough_directories(hs_dirs)) {
+ if (hid_serv_have_enough_directories()) {
int seconds_valid;
smartlist_t *desc_strs = smartlist_create();
smartlist_t *desc_ids = smartlist_create();
@@ -1112,7 +1111,6 @@ upload_service_descriptor(rend_service_t *service)
if (seconds_valid < 0) {
log_warn(LD_BUG, "Internal error: couldn't encode service descriptor; "
"not uploading.");
- smartlist_free(hs_dirs);
return;
}
/* Post the current descriptors to the hidden service directories. */
@@ -1143,7 +1141,6 @@ upload_service_descriptor(rend_service_t *service)
if (seconds_valid < 0) {
log_warn(LD_BUG, "Internal error: couldn't encode service "
"descriptor; not uploading.");
- smartlist_free(hs_dirs);
return;
}
directory_post_to_hs_dir(desc_ids, desc_strs, serviceid,
@@ -1159,7 +1156,6 @@ upload_service_descriptor(rend_service_t *service)
uploaded = 1;
log_info(LD_REND, "Successfully uploaded v2 rend descriptors!");
}
- smartlist_free(hs_dirs);
}
/* If not uploaded, try again in one minute. */