summaryrefslogtreecommitdiff
path: root/src/or/directory.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2016-03-21 17:08:02 -0400
committerRoger Dingledine <arma@torproject.org>2016-03-21 17:08:02 -0400
commit4861e245529d70da5ca146eb2da1f22f7c68b5bb (patch)
tree9ede87ee02de013834f1b62645d133df34b5dcba /src/or/directory.c
parent6a91cab79c23b47c48e35e95661dfbe81be943dd (diff)
downloadtor-4861e245529d70da5ca146eb2da1f22f7c68b5bb.tar.gz
tor-4861e245529d70da5ca146eb2da1f22f7c68b5bb.zip
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.
Diffstat (limited to 'src/or/directory.c')
-rw-r--r--src/or/directory.c66
1 files changed, 33 insertions, 33 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index 39fffc749e..7130041b26 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -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);
-
- /* 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;
+ 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;
}
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;
}