diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-02-19 09:09:25 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-02-19 09:09:25 -0500 |
commit | 86105a4009bf3e128abfa3e735d8fa6f1f4d5975 (patch) | |
tree | aed21bc05c8d864f30ec5460f013f9c80ea8b1a6 /src/or/rendclient.c | |
parent | 0e22da1b8de0bc10ebe80eb00f9e848a392edbdd (diff) | |
download | tor-86105a4009bf3e128abfa3e735d8fa6f1f4d5975.tar.gz tor-86105a4009bf3e128abfa3e735d8fa6f1f4d5975.zip |
Check ENABLE_TOR2WEB_MODE before any tor2webmode code
Diffstat (limited to 'src/or/rendclient.c')
-rw-r--r-- | src/or/rendclient.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/or/rendclient.c b/src/or/rendclient.c index 0c02243828..162e0ac53e 100644 --- a/src/or/rendclient.c +++ b/src/or/rendclient.c @@ -620,7 +620,12 @@ 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]; +#ifdef ENABLE_TOR2WEB_MODE const int tor2web_mode = options->Tor2webMode; + const int how_to_fetch = tor2web_mode ? DIRIND_ONEHOP : DIRIND_ANONYMOUS; +#else + const int how_to_fetch = DIRIND_ANONYMOUS; +#endif int excluded_some; tor_assert(desc_id); tor_assert(rend_query); @@ -697,7 +702,7 @@ 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, - tor2web_mode?DIRIND_ONEHOP:DIRIND_ANONYMOUS, + how_to_fetch, desc_id_base32, NULL, 0, 0, rend_query); |