Reindent the just-extracted directory response handler functions

This commit is contained in:
Nick Mathewson 2017-05-02 13:11:44 -04:00
parent db86b9194d
commit e0c937f316

View File

@ -2464,7 +2464,6 @@ handle_response_fetch_certificate(dir_connection_t *conn,
return 0;
}
/**
* Handler function: processes a response to a request for an authority's
* current networkstatus vote.
@ -2845,15 +2844,17 @@ handle_response_fetch_renddesc_v2(dir_connection_t *conn,
const char *body = args->body;
const size_t body_len = args->body_len;
#define SEND_HS_DESC_FAILED_EVENT(reason) ( \
control_event_hs_descriptor_failed(conn->rend_data, \
#define SEND_HS_DESC_FAILED_EVENT(reason) \
(control_event_hs_descriptor_failed(conn->rend_data, \
conn->identity_digest, \
reason) )
#define SEND_HS_DESC_FAILED_CONTENT() ( \
control_event_hs_descriptor_content(rend_data_get_address(conn->rend_data), \
reason))
#define SEND_HS_DESC_FAILED_CONTENT() \
(control_event_hs_descriptor_content( \
rend_data_get_address(conn->rend_data), \
conn->requested_resource, \
conn->identity_digest, \
NULL) )
NULL))
tor_assert(conn->rend_data);
log_info(LD_REND,"Received rendezvous descriptor (body size %d, status %d "
"(%s))",
@ -2864,7 +2865,8 @@ handle_response_fetch_renddesc_v2(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) {
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()
@ -2936,11 +2938,12 @@ handle_response_upload_renddesc_v2(dir_connection_t *conn,
const int status_code = args->status_code;
const char *reason = args->reason;
#define SEND_HS_DESC_UPLOAD_FAILED_EVENT(reason) ( \
control_event_hs_descriptor_upload_failed( \
#define SEND_HS_DESC_UPLOAD_FAILED_EVENT(reason) \
(control_event_hs_descriptor_upload_failed( \
conn->identity_digest, \
rend_data_get_address(conn->rend_data), \
reason) )
reason))
log_info(LD_REND,"Uploaded rendezvous descriptor (status %d "
"(%s))",
status_code, escaped(reason));