mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
fix indentation after #18332 patches
no actual changes here -- but the new indenting makes it clear that the fixes in #18332 were not as good as they should have been. the next commit will deal with that.
This commit is contained in:
parent
6a91cab79c
commit
4861e24552
@ -2298,34 +2298,34 @@ connection_dir_client_reached_eof(dir_connection_t *conn)
|
||||
rend_cache_entry_t *entry = NULL;
|
||||
|
||||
if (rend_cache_store_v2_desc_as_client(body,
|
||||
conn->requested_resource, conn->rend_data, &entry) < 0) {
|
||||
log_warn(LD_REND,"Fetching v2 rendezvous descriptor failed. "
|
||||
"Retrying at another directory.");
|
||||
/* We'll retry when connection_about_to_close_connection()
|
||||
* cleans this dir conn up. */
|
||||
SEND_HS_DESC_FAILED_EVENT("BAD_DESC");
|
||||
SEND_HS_DESC_FAILED_CONTENT();
|
||||
break;
|
||||
conn->requested_resource, conn->rend_data, &entry) < 0) {
|
||||
log_warn(LD_REND,"Fetching v2 rendezvous descriptor failed. "
|
||||
"Retrying at another directory.");
|
||||
/* We'll retry when connection_about_to_close_connection()
|
||||
* cleans this dir conn up. */
|
||||
SEND_HS_DESC_FAILED_EVENT("BAD_DESC");
|
||||
SEND_HS_DESC_FAILED_CONTENT();
|
||||
break;
|
||||
} else {
|
||||
char service_id[REND_SERVICE_ID_LEN_BASE32 + 1];
|
||||
/* Should never be NULL here if we found the descriptor. */
|
||||
tor_assert(entry);
|
||||
rend_get_service_id(entry->parsed->pk, service_id);
|
||||
char service_id[REND_SERVICE_ID_LEN_BASE32 + 1];
|
||||
/* Should never be NULL here if we found the descriptor. */
|
||||
tor_assert(entry);
|
||||
rend_get_service_id(entry->parsed->pk, service_id);
|
||||
|
||||
/* success. notify pending connections about this. */
|
||||
log_info(LD_REND, "Successfully fetched v2 rendezvous "
|
||||
"descriptor.");
|
||||
control_event_hs_descriptor_received(service_id,
|
||||
conn->rend_data,
|
||||
conn->identity_digest);
|
||||
control_event_hs_descriptor_content(service_id,
|
||||
conn->requested_resource,
|
||||
conn->identity_digest,
|
||||
body);
|
||||
conn->base_.purpose = DIR_PURPOSE_HAS_FETCHED_RENDDESC_V2;
|
||||
rend_client_desc_trynow(service_id);
|
||||
memwipe(service_id, 0, sizeof(service_id));
|
||||
break;
|
||||
/* success. notify pending connections about this. */
|
||||
log_info(LD_REND, "Successfully fetched v2 rendezvous "
|
||||
"descriptor.");
|
||||
control_event_hs_descriptor_received(service_id,
|
||||
conn->rend_data,
|
||||
conn->identity_digest);
|
||||
control_event_hs_descriptor_content(service_id,
|
||||
conn->requested_resource,
|
||||
conn->identity_digest,
|
||||
body);
|
||||
conn->base_.purpose = DIR_PURPOSE_HAS_FETCHED_RENDDESC_V2;
|
||||
rend_client_desc_trynow(service_id);
|
||||
memwipe(service_id, 0, sizeof(service_id));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -3429,13 +3429,13 @@ directory_handle_command_post(dir_connection_t *conn, const char *headers,
|
||||
if (connection_dir_is_encrypted(conn) &&
|
||||
!strcmpstart(url,"/tor/rendezvous2/publish")) {
|
||||
if (rend_cache_store_v2_desc_as_dir(body) < 0) {
|
||||
log_warn(LD_REND, "Rejected v2 rend descriptor (length %d) from %s.",
|
||||
(int)body_len, conn->base_.address);
|
||||
write_http_status_line(conn, 400,
|
||||
"Invalid v2 service descriptor rejected");
|
||||
log_warn(LD_REND, "Rejected v2 rend descriptor (length %d) from %s.",
|
||||
(int)body_len, conn->base_.address);
|
||||
write_http_status_line(conn, 400,
|
||||
"Invalid v2 service descriptor rejected");
|
||||
} else {
|
||||
write_http_status_line(conn, 200, "Service descriptor (v2) stored");
|
||||
log_info(LD_REND, "Handled v2 rendezvous descriptor post: accepted");
|
||||
write_http_status_line(conn, 200, "Service descriptor (v2) stored");
|
||||
log_info(LD_REND, "Handled v2 rendezvous descriptor post: accepted");
|
||||
}
|
||||
goto done;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user