[tor-commits] [tor/master] whitespace fixes to pass 'make check-spaces'

nickm at torproject.org nickm at torproject.org
Tue Mar 15 21:20:38 UTC 2011


commit c2775196f79b9dba70d517663004e1783873f35c
Author: Roger Dingledine <arma at torproject.org>
Date:   Tue Mar 15 16:59:58 2011 -0400

    whitespace fixes to pass 'make check-spaces'
---
 src/or/connection.c |   10 ++++++----
 src/or/relay.c      |   24 ++++++++++++------------
 2 files changed, 18 insertions(+), 16 deletions(-)

diff --git a/src/or/connection.c b/src/or/connection.c
index ff23646..b586b43 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -3264,7 +3264,7 @@ _connection_write_to_buf_impl(const char *string, size_t len,
    * conn->write_event won't be set yet.  Otherwise, write data from
    * this conn as the socket is available. */
   if (conn->write_event) {
-      connection_start_writing(conn);
+    connection_start_writing(conn);
   }
   if (zlib) {
     conn->outbuf_flushlen += buf_datalen(conn->outbuf) - old_datalen;
@@ -3845,9 +3845,11 @@ assert_connection_ok(connection_t *conn, time_t now)
      * EXIT_CONN_STATE_RESOLVING while the conn is not yet marked to writing.
      * */
     tor_assert((conn->type == CONN_TYPE_EXIT &&
-		conn->state == EXIT_CONN_STATE_RESOLVING) ||
-	    connection_is_writing(conn) || conn->write_blocked_on_bw ||
-            (CONN_IS_EDGE(conn) && TO_EDGE_CONN(conn)->edge_blocked_on_circ));
+                conn->state == EXIT_CONN_STATE_RESOLVING) ||
+               connection_is_writing(conn) ||
+               conn->write_blocked_on_bw ||
+               (CONN_IS_EDGE(conn) &&
+                TO_EDGE_CONN(conn)->edge_blocked_on_circ));
   }
 
   if (conn->hold_open_until_flushed)
diff --git a/src/or/relay.c b/src/or/relay.c
index 17ce7db..81a6497 100644
--- a/src/or/relay.c
+++ b/src/or/relay.c
@@ -1031,9 +1031,9 @@ connection_edge_process_relay_cell(cell_t *cell, circuit_t *circ,
   relay_header_t rh;
   unsigned domain = layer_hint?LD_APP:LD_EXIT;
   int reason;
-  int optimistic_data = 0;  /* Set to 1 if we receive data on a stream
-			       that's in the EXIT_CONN_STATE_RESOLVING
-			       or EXIT_CONN_STATE_CONNECTING states.*/
+  int optimistic_data = 0; /* Set to 1 if we receive data on a stream
+                            * that's in the EXIT_CONN_STATE_RESOLVING
+                            * or EXIT_CONN_STATE_CONNECTING states. */
 
   tor_assert(cell);
   tor_assert(circ);
@@ -1055,16 +1055,16 @@ connection_edge_process_relay_cell(cell_t *cell, circuit_t *circ,
 
   if (conn && !connection_state_is_open(TO_CONN(conn))) {
     if (conn->_base.type == CONN_TYPE_EXIT &&
-	    (conn->_base.state == EXIT_CONN_STATE_CONNECTING ||
-		conn->_base.state == EXIT_CONN_STATE_RESOLVING) &&
-	rh.command == RELAY_COMMAND_DATA) {
-	/* We're going to allow DATA cells to be delivered to an exit
-	 * node in state EXIT_CONN_STATE_CONNECTING or
-	 * EXIT_CONN_STATE_RESOLVING.  This speeds up HTTP, for example. */
-	optimistic_data = 1;
+        (conn->_base.state == EXIT_CONN_STATE_CONNECTING ||
+         conn->_base.state == EXIT_CONN_STATE_RESOLVING) &&
+        rh.command == RELAY_COMMAND_DATA) {
+      /* Allow DATA cells to be delivered to an exit node in state
+       * EXIT_CONN_STATE_CONNECTING or EXIT_CONN_STATE_RESOLVING.
+       * This speeds up HTTP, for example. */
+      optimistic_data = 1;
     } else {
-	return connection_edge_process_relay_cell_not_open(
-		 &rh, cell, circ, conn, layer_hint);
+      return connection_edge_process_relay_cell_not_open(
+               &rh, cell, circ, conn, layer_hint);
     }
   }
 





More information about the tor-commits mailing list