mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-26 23:52:30 +01:00
fixup! Download microdescriptors if you're a cache
This commit is contained in:
parent
cae0e7b06b
commit
06bda50600
1 changed files with 3 additions and 2 deletions
|
@ -4295,8 +4295,9 @@ MOCK_IMPL(STATIC void, initiate_descriptor_downloads,
|
||||||
{
|
{
|
||||||
char *resource, *cp;
|
char *resource, *cp;
|
||||||
int digest_len = DIGEST_LEN, enc_digest_len = HEX_DIGEST_LEN;
|
int digest_len = DIGEST_LEN, enc_digest_len = HEX_DIGEST_LEN;
|
||||||
char *sep = "+";
|
const char *sep = "+";
|
||||||
int b64_256 = 0;
|
int b64_256 = 0;
|
||||||
|
smartlist_t *tmp;
|
||||||
|
|
||||||
if (purpose == DIR_PURPOSE_FETCH_MICRODESC) {
|
if (purpose == DIR_PURPOSE_FETCH_MICRODESC) {
|
||||||
/* Microdescriptors are downloaded by "-"-separated base64-encoded
|
/* Microdescriptors are downloaded by "-"-separated base64-encoded
|
||||||
|
@ -4316,7 +4317,7 @@ MOCK_IMPL(STATIC void, initiate_descriptor_downloads,
|
||||||
return;
|
return;
|
||||||
|
|
||||||
digest_len += 1; // for the NULL
|
digest_len += 1; // for the NULL
|
||||||
smartlist_t *tmp = smartlist_new();
|
tmp = smartlist_new();
|
||||||
|
|
||||||
for (; lo < hi; ++lo) {
|
for (; lo < hi; ++lo) {
|
||||||
cp = tor_malloc(enc_digest_len);
|
cp = tor_malloc(enc_digest_len);
|
||||||
|
|
Loading…
Add table
Reference in a new issue