diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-04-21 15:08:28 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-04-21 15:08:28 -0400 |
commit | 8aadd60eac6d2b4feb176e34805b4bd5a8b77aed (patch) | |
tree | 17a30e24707bd2fc6efc635dd2a3d909cffb628f /src/or/rendservice.c | |
parent | 4e393f53188055e478c0292af504fb97d02a4ff2 (diff) | |
download | tor-8aadd60eac6d2b4feb176e34805b4bd5a8b77aed.tar.gz tor-8aadd60eac6d2b4feb176e34805b4bd5a8b77aed.zip |
Replace remaining directory_initiate_command_* instances
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 3c4b6775c0..82d8e4c48e 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -3712,13 +3712,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); |