diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-04-27 10:08:32 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-04-27 10:08:32 -0400 |
commit | 33a2fd065d1fd34eb4378fa2c8eb799ee5e7b172 (patch) | |
tree | 6d670ac1d7f37eae00078bc5ded6b05e714c5271 /src/or/rendservice.c | |
parent | 224259a929e0503137ebd191d77a4783e8c1a81b (diff) | |
parent | b4fe0a6a0321f241cc0a37ca6fc528aae33afd74 (diff) | |
download | tor-33a2fd065d1fd34eb4378fa2c8eb799ee5e7b172.tar.gz tor-33a2fd065d1fd34eb4378fa2c8eb799ee5e7b172.zip |
Merge branch 'dirreq'
Diffstat (limited to 'src/or/rendservice.c')
-rw-r--r-- | src/or/rendservice.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c index c19c85f6a3..5de153caa4 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -3705,13 +3705,16 @@ directory_post_to_hs_dir(rend_service_descriptor_t *renddesc, * request. Lookup is made in rend_service_desc_has_uploaded(). */ rend_data = rend_data_client_create(service_id, desc->desc_id, NULL, REND_NO_AUTH); - directory_initiate_command_routerstatus_rend(hs_dir, - DIR_PURPOSE_UPLOAD_RENDDESC_V2, - ROUTER_PURPOSE_GENERAL, - DIRIND_ANONYMOUS, NULL, - desc->desc_str, - strlen(desc->desc_str), - 0, rend_data, NULL); + directory_request_t *req = + directory_request_new(DIR_PURPOSE_UPLOAD_RENDDESC_V2); + directory_request_set_routerstatus(req, hs_dir); + directory_request_set_indirection(req, DIRIND_ANONYMOUS); + directory_request_set_payload(req, + desc->desc_str, strlen(desc->desc_str)); + directory_request_set_rend_query(req, rend_data); + directory_initiate_request(req); + directory_request_free(req); + rend_data_free(rend_data); base32_encode(desc_id_base32, sizeof(desc_id_base32), desc->desc_id, DIGEST_LEN); |