aboutsummaryrefslogtreecommitdiff
path: root/src/or/rendclient.c
diff options
context:
space:
mode:
authorRobert Ransom <rransom.8774@gmail.com>2011-06-01 01:45:24 -0700
committerNick Mathewson <nickm@torproject.org>2011-11-30 14:54:15 -0500
commit29287ed0edf925fd9e05d5fbed53eb37bc8799c7 (patch)
treee546fdddb1fa8947ca852c7d48d37697a29ab7c8 /src/or/rendclient.c
parentebf524b48b0340ed3b2bfc1d652e3d65b3aee11c (diff)
downloadtor-29287ed0edf925fd9e05d5fbed53eb37bc8799c7.tar.gz
tor-29287ed0edf925fd9e05d5fbed53eb37bc8799c7.zip
Perform single-hop HS desc fetches when in tor2web mode
Diffstat (limited to 'src/or/rendclient.c')
-rw-r--r--src/or/rendclient.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/rendclient.c b/src/or/rendclient.c
index 6a45207e29..fae9df0d52 100644
--- a/src/or/rendclient.c
+++ b/src/or/rendclient.c
@@ -529,6 +529,7 @@ directory_get_from_hs_dir(const char *desc_id, const rend_data_t *rend_query)
char desc_id_base32[REND_DESC_ID_V2_LEN_BASE32 + 1];
time_t now = time(NULL);
char descriptor_cookie_base64[3*REND_DESC_COOKIE_LEN_BASE64];
+ int tor2web_mode = get_options()->Tor2webMode;
tor_assert(desc_id);
tor_assert(rend_query);
/* Determine responsible dirs. Even if we can't get all we want,
@@ -587,7 +588,8 @@ directory_get_from_hs_dir(const char *desc_id, const rend_data_t *rend_query)
directory_initiate_command_routerstatus_rend(hs_dir,
DIR_PURPOSE_FETCH_RENDDESC_V2,
ROUTER_PURPOSE_GENERAL,
- 1, desc_id_base32, NULL, 0, 0,
+ !tor2web_mode, desc_id_base32,
+ NULL, 0, 0,
rend_query);
log_info(LD_REND, "Sending fetch request for v2 descriptor for "
"service '%s' with descriptor ID '%s', auth type %d, "