Browse Source

Make check-spaces happier.

Nick Mathewson 9 years ago
parent
commit
2e8b8c8698
4 changed files with 11 additions and 8 deletions
  1. 4 2
      src/or/connection_edge.c
  2. 0 1
      src/or/connection_edge.h
  3. 4 2
      src/or/relay.c
  4. 3 3
      src/test/test_entryconn.c

+ 4 - 2
src/or/connection_edge.c

@@ -1378,7 +1378,8 @@ connection_ap_handshake_rewrite_and_attach(entry_connection_t *conn,
             log_warn(LD_NET, "Rejecting SOCKS4 request for an IPv6 address.");
             connection_mark_unattached_ap(conn, END_STREAM_REASON_ENTRYPOLICY);
             return -1;
-          } else if (socks->socks_version == 4 && !conn->entry_cfg.ipv4_traffic) {
+          } else if (socks->socks_version == 4 &&
+                     !conn->entry_cfg.ipv4_traffic) {
             /* You can't do any kind of Socks4 request when IPv4 is forbidden.
              *
              * XXX raise this check outside the enclosing block? */
@@ -3282,7 +3283,8 @@ connection_edge_compatible_with_circuit(const entry_connection_t *conn,
   if ((iso & ISO_CLIENTADDR) &&
       !tor_addr_eq(&ENTRY_TO_CONN(conn)->addr, &circ->client_addr))
     return 0;
-  if ((iso & ISO_SESSIONGRP) && conn->entry_cfg.session_group != circ->session_group)
+  if ((iso & ISO_SESSIONGRP) &&
+      conn->entry_cfg.session_group != circ->session_group)
     return 0;
   if ((iso & ISO_NYM_EPOCH) && conn->nym_epoch != circ->nym_epoch)
     return 0;

+ 0 - 1
src/or/connection_edge.h

@@ -144,7 +144,6 @@ STATIC int connected_cell_format_payload(uint8_t *payload_out,
                                   const tor_addr_t *addr,
                                   uint32_t ttl);
 
-
 typedef struct {
   /** Original address, after we lowercased it but before we started
    * mapping it.

+ 4 - 2
src/or/relay.c

@@ -804,8 +804,10 @@ connection_ap_process_end_not_open(
             return 0;
           }
 
-          if ((tor_addr_family(&addr) == AF_INET && !conn->entry_cfg.ipv4_traffic) ||
-              (tor_addr_family(&addr) == AF_INET6 && !conn->entry_cfg.ipv6_traffic)) {
+          if ((tor_addr_family(&addr) == AF_INET &&
+                                          !conn->entry_cfg.ipv4_traffic) ||
+              (tor_addr_family(&addr) == AF_INET6 &&
+                                          !conn->entry_cfg.ipv6_traffic)) {
             log_fn(LOG_PROTOCOL_WARN, LD_APP,
                    "Got an EXITPOLICY failure on a connection with a "
                    "mismatched family. Closing.");

+ 3 - 3
src/test/test_entryconn.c

@@ -617,7 +617,8 @@ test_entryconn_rewrite_mapaddress_automap_onion(void *arg)
   tt_int_op(rr.automap, OP_EQ, 0);
   tt_int_op(rr.should_close, OP_EQ, 0);
   tt_int_op(rr.end_reason, OP_EQ, 0);
-  tt_assert(!strcmpstart(ec3->socks_request->address, "abcdefghijklmnop.onion"));
+  tt_assert(!strcmpstart(ec3->socks_request->address,
+                         "abcdefghijklmnop.onion"));
 
   /* Now resolve abcefghijklmnop.onion. */
   strlcpy(ec4->socks_request->address, "abcdefghijklmnop.onion",
@@ -633,7 +634,7 @@ test_entryconn_rewrite_mapaddress_automap_onion(void *arg)
   tt_str_op(rr.orig_address, OP_EQ, "abcdefghijklmnop.onion");
   tt_assert(!strcmpstart(ec4->socks_request->address, "192.168."));
   /* XXXX doesn't work
-     tt_str_op(ec4->socks_request->address, OP_EQ, ec2->socks_request->address);
+   tt_str_op(ec4->socks_request->address, OP_EQ, ec2->socks_request->address);
   */
 
  done:
@@ -742,7 +743,6 @@ test_entryconn_rewrite_mapaddress_automap_onion4(void *arg)
   test_entryconn_rewrite_mapaddress_automap_onion_common(arg, 0, 1);
 }
 
-
 #define REWRITE(name)                           \
   { #name, test_entryconn_##name, TT_FORK, &test_rewrite_setup, NULL }