mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Improve log statement when publishing v2 hs desc.
This commit is contained in:
parent
174be15c1a
commit
c8b27a8e9e
@ -1553,6 +1553,7 @@ directory_post_to_hs_dir(rend_service_descriptor_t *renddesc,
|
|||||||
}
|
}
|
||||||
for (j = 0; j < smartlist_len(responsible_dirs); j++) {
|
for (j = 0; j < smartlist_len(responsible_dirs); j++) {
|
||||||
char desc_id_base32[REND_DESC_ID_V2_LEN_BASE32 + 1];
|
char desc_id_base32[REND_DESC_ID_V2_LEN_BASE32 + 1];
|
||||||
|
char *hs_dir_ip;
|
||||||
hs_dir = smartlist_get(responsible_dirs, j);
|
hs_dir = smartlist_get(responsible_dirs, j);
|
||||||
if (smartlist_digest_isin(renddesc->successful_uploads,
|
if (smartlist_digest_isin(renddesc->successful_uploads,
|
||||||
hs_dir->identity_digest))
|
hs_dir->identity_digest))
|
||||||
@ -1574,15 +1575,18 @@ directory_post_to_hs_dir(rend_service_descriptor_t *renddesc,
|
|||||||
strlen(desc->desc_str), 0);
|
strlen(desc->desc_str), 0);
|
||||||
base32_encode(desc_id_base32, sizeof(desc_id_base32),
|
base32_encode(desc_id_base32, sizeof(desc_id_base32),
|
||||||
desc->desc_id, DIGEST_LEN);
|
desc->desc_id, DIGEST_LEN);
|
||||||
|
hs_dir_ip = tor_dup_ip(hs_dir->addr);
|
||||||
log_info(LD_REND, "Sending publish request for v2 descriptor for "
|
log_info(LD_REND, "Sending publish request for v2 descriptor for "
|
||||||
"service '%s' with descriptor ID '%s' with validity "
|
"service '%s' with descriptor ID '%s' with validity "
|
||||||
"of %d seconds to hidden service directory '%s' on "
|
"of %d seconds to hidden service directory '%s' on "
|
||||||
"port %d.",
|
"%s:%d.",
|
||||||
safe_str(service_id),
|
safe_str(service_id),
|
||||||
safe_str(desc_id_base32),
|
safe_str(desc_id_base32),
|
||||||
seconds_valid,
|
seconds_valid,
|
||||||
hs_dir->nickname,
|
hs_dir->nickname,
|
||||||
hs_dir->dir_port);
|
hs_dir_ip,
|
||||||
|
hs_dir->or_port);
|
||||||
|
tor_free(hs_dir_ip);
|
||||||
/* Remember successful upload to this router for next time. */
|
/* Remember successful upload to this router for next time. */
|
||||||
if (!smartlist_digest_isin(successful_uploads, hs_dir->identity_digest))
|
if (!smartlist_digest_isin(successful_uploads, hs_dir->identity_digest))
|
||||||
smartlist_add(successful_uploads, hs_dir->identity_digest);
|
smartlist_add(successful_uploads, hs_dir->identity_digest);
|
||||||
|
Loading…
Reference in New Issue
Block a user