diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-04-21 14:35:42 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-04-21 14:35:42 -0400 |
commit | eee733be33cc2ed698b35b4ea226390f534daa6a (patch) | |
tree | 255d2562148a57cdb50e091d2b1a1a11251c569c /src/or | |
parent | c300fd7e65b699c3d2704737cd0c73276ca0a346 (diff) | |
download | tor-eee733be33cc2ed698b35b4ea226390f534daa6a.tar.gz tor-eee733be33cc2ed698b35b4ea226390f534daa6a.zip |
Refactor directory_post_to_dirservers to use requests
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/directory.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/or/directory.c b/src/or/directory.c index 1996e565b9..386ba2f39d 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -407,11 +407,14 @@ directory_post_to_dirservers(uint8_t dir_purpose, uint8_t router_purpose, } else { indirection = DIRIND_DIRECT_CONN; } - directory_initiate_command_routerstatus(rs, dir_purpose, - router_purpose, - indirection, - NULL, payload, upload_len, 0, - NULL); + + directory_request_t *req = directory_request_new(dir_purpose); + directory_request_set_routerstatus(req, rs); + directory_request_set_router_purpose(req, router_purpose); + directory_request_set_indirection(req, indirection); + directory_request_set_payload(req, payload, upload_len); + directory_initiate_request(req); + directory_request_free(req); } SMARTLIST_FOREACH_END(ds); if (!found) { char *s = authdir_type_to_string(type); |