From 42f7ae3eaeb3d0f1067234f3acf9c0f0f4e6cf1a Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 5 Nov 2007 19:23:57 +0000 Subject: 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 --- src/or/rendservice.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/or/rendservice.c') 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. */ -- cgit v1.2.3-54-g00ecf