[tor-commits] [tor/master] fix indentation after #18332 patches

arma at torproject.org arma at torproject.org
Mon Mar 21 21:13:52 UTC 2016


commit 4861e245529d70da5ca146eb2da1f22f7c68b5bb
Author: Roger Dingledine <arma at torproject.org>
Date:   Mon Mar 21 17:08:02 2016 -0400

    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.
---
 src/or/directory.c | 66 +++++++++++++++++++++++++++---------------------------
 1 file changed, 33 insertions(+), 33 deletions(-)

diff --git a/src/or/directory.c b/src/or/directory.c
index 39fffc7..7130041 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;
   }





More information about the tor-commits mailing list