diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-04-21 14:47:14 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-04-21 14:47:14 -0400 |
commit | 4e393f53188055e478c0292af504fb97d02a4ff2 (patch) | |
tree | d727b3dd19c83584c20691f75307a82840691d94 /src/or/bridges.c | |
parent | 4ae65bb5d37b85df19984dc19eedca31f2ae5557 (diff) | |
download | tor-4e393f53188055e478c0292af504fb97d02a4ff2.tar.gz tor-4e393f53188055e478c0292af504fb97d02a4ff2.zip |
Make launch_direct_bridge_descriptor_fetch use dirreqs.
Diffstat (limited to 'src/or/bridges.c')
-rw-r--r-- | src/or/bridges.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/or/bridges.c b/src/or/bridges.c index 255e0a4f7c..ef0638c0a7 100644 --- a/src/or/bridges.c +++ b/src/or/bridges.c @@ -570,12 +570,18 @@ launch_direct_bridge_descriptor_fetch(bridge_info_t *bridge) return; } - directory_initiate_command(&bridge->addr, bridge->port, - NULL, 0, /*no dirport*/ - bridge->identity, - DIR_PURPOSE_FETCH_SERVERDESC, - ROUTER_PURPOSE_BRIDGE, - DIRIND_ONEHOP, "authority.z", NULL, 0, 0); + tor_addr_port_t bridge_addrport; + memcpy(&bridge_addrport.addr, &bridge->addr, sizeof(tor_addr_t)); + bridge_addrport.port = bridge->port; + + directory_request_t *req = + directory_request_new(DIR_PURPOSE_FETCH_SERVERDESC); + directory_request_set_or_addr_port(req, &bridge_addrport); + directory_request_set_directory_id_digest(req, bridge->identity); + directory_request_set_router_purpose(req, ROUTER_PURPOSE_BRIDGE); + directory_request_set_resource(req, "authority.z"); + directory_initiate_request(req); + directory_request_free(req); } /** Fetching the bridge descriptor from the bridge authority returned a |