aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-10-11 11:30:01 -0400
committerNick Mathewson <nickm@torproject.org>2011-10-11 11:30:01 -0400
commit69921837a743d551576b3b157657623a0bb96308 (patch)
tree2280953a09d763ec3359107d0da96d55ef90fbf7 /src/or
parent3b704fd16667007d49223e1ae555eb7bd03092b3 (diff)
downloadtor-69921837a743d551576b3b157657623a0bb96308.tar
tor-69921837a743d551576b3b157657623a0bb96308.tar.gz
Fix a bunch of whitespace errors
Diffstat (limited to 'src/or')
-rw-r--r--src/or/buffers.c11
-rw-r--r--src/or/command.c6
-rw-r--r--src/or/config.c6
-rw-r--r--src/or/connection_or.c12
-rw-r--r--src/or/connection_or.h6
-rw-r--r--src/or/hibernate.c1
-rw-r--r--src/or/rendclient.c4
7 files changed, 25 insertions, 21 deletions
diff --git a/src/or/buffers.c b/src/or/buffers.c
index c589fbaef..f4aac0f0e 100644
--- a/src/or/buffers.c
+++ b/src/or/buffers.c
@@ -1005,14 +1005,15 @@ fetch_from_buf(char *string, size_t string_len, buf_t *buf)
return (int)buf->datalen;
}
-/** True iff the cell command <b>command</b> is one that implies a variable-length
- * cell in Tor link protocol <b>linkproto</b>. */
+/** True iff the cell command <b>command</b> is one that implies a
+ * variable-length cell in Tor link protocol <b>linkproto</b>. */
static inline int
cell_command_is_var_length(uint8_t command, int linkproto)
{
- /* If linkproto is v2 (2), CELL_VERSIONS is the only variable-length cells work as
- * implemented here. If it's 1, there are no variable-length cells. Tor
- * does not support other versions right now, and so can't negotiate them.
+ /* If linkproto is v2 (2), CELL_VERSIONS is the only variable-length cells
+ * work as implemented here. If it's 1, there are no variable-length cells.
+ * Tor does not support other versions right now, and so can't negotiate
+ * them.
*/
switch (linkproto) {
case 1:
diff --git a/src/or/command.c b/src/or/command.c
index a51115631..1b8ddb30d 100644
--- a/src/or/command.c
+++ b/src/or/command.c
@@ -1016,7 +1016,6 @@ command_process_cert_cell(var_cell_t *cell, or_connection_t *conn)
if (! tor_tls_cert_is_valid(id_cert, id_cert, 1))
ERR("The ID certificate was not valid");
-
log_info(LD_OR, "Got some good certificates from %s:%d: "
"Waiting for AUTHENTICATE.",
safe_str(conn->_base.address), conn->_base.port);
@@ -1026,7 +1025,7 @@ command_process_cert_cell(var_cell_t *cell, or_connection_t *conn)
}
conn->handshake_state->received_cert_cell = 1;
-err:
+ err:
tor_cert_free(id_cert);
tor_cert_free(link_cert);
tor_cert_free(auth_cert);
@@ -1100,7 +1099,8 @@ command_process_auth_challenge_cell(var_cell_t *cell, or_connection_t *conn)
return;
}
} else {
- log_info(LD_OR, "Got an AUTH_CHALLENGE cell from %s:%d: Not authenticating",
+ log_info(LD_OR, "Got an AUTH_CHALLENGE cell from %s:%d: Not "
+ "authenticating",
safe_str(conn->_base.address), conn->_base.port);
}
#undef ERR
diff --git a/src/or/config.c b/src/or/config.c
index 1304c469f..e72630d4d 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -5134,9 +5134,9 @@ warn_nonlocal_client_ports(const smartlist_t *ports, const char *portname)
"use it as an open proxy. Please don't allow this unless you "
"have a good reason.", portname);
} else if (!tor_addr_is_loopback(&port->addr)) {
- log_notice(LD_CONFIG, "You configured a non-loopback address for %sPort. "
- "This allows everybody on your local network to use your "
- "machine as a proxy. Make sure this is what you wanted.",
+ log_notice(LD_CONFIG, "You configured a non-loopback address for "
+ "%sPort. This allows everybody on your local network to use "
+ "your machine as a proxy. Make sure this is what you wanted.",
portname);
}
} SMARTLIST_FOREACH_END(port);
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index bcae075c5..14da69851 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -1185,8 +1185,8 @@ connection_tls_continue_handshake(or_connection_t *conn)
"handshake.");
return connection_or_launch_v3_or_handshake(conn);
} else {
- log_debug(LD_OR, "Done with initial SSL handshake (client-side). "
- "Requesting renegotiation.");
+ log_debug(LD_OR, "Done with initial SSL handshake (client-side)."
+ " Requesting renegotiation.");
conn->_base.state = OR_CONN_STATE_TLS_CLIENT_RENEGOTIATING;
goto again;
}
@@ -1564,7 +1564,6 @@ connection_or_launch_v3_or_handshake(or_connection_t *conn)
return connection_or_send_versions(conn, 1);
}
-
/** Allocate a new connection handshake state for the connection
* <b>conn</b>. Return 0 on success, -1 on failure. */
int
@@ -1964,8 +1963,8 @@ connection_or_send_cert_cell(or_connection_t *conn)
tor_cert_get_der(link_cert, &link_encoded, &link_len);
tor_cert_get_der(id_cert, &id_encoded, &id_len);
- cell_len = 1 /* 1 octet: num certs in cell */ +
- 2 * ( 1 + 2 ) /* For each cert: 1 octet for type, 2 for length */ +
+ cell_len = 1 /* 1 byte: num certs in cell */ +
+ 2 * ( 1 + 2 ) /* For each cert: 1 byte for type, 2 for length */ +
link_len + id_len;
cell = var_cell_new(cell_len);
cell->command = CELL_CERT;
@@ -2178,7 +2177,7 @@ connection_or_send_authenticate_cell(or_connection_t *conn, int authtype)
/* XXXX make sure we're actually supposed to send this! */
if (!pk) {
- log_warn(LD_BUG, "Unable to compute authenticate cell: no client auth key");
+ log_warn(LD_BUG, "Can't compute authenticate cell: no client auth key");
return -1;
}
if (authtype != AUTHTYPE_RSA_SHA256_TLSSECRET) {
@@ -2216,3 +2215,4 @@ connection_or_send_authenticate_cell(or_connection_t *conn, int authtype)
return 0;
}
+
diff --git a/src/or/connection_or.h b/src/or/connection_or.h
index de3a989a6..df009ab39 100644
--- a/src/or/connection_or.h
+++ b/src/or/connection_or.h
@@ -41,9 +41,11 @@ void connection_or_report_broken_states(int severity, int domain);
int connection_tls_start_handshake(or_connection_t *conn, int receiving);
int connection_tls_continue_handshake(or_connection_t *conn);
-int connection_init_or_handshake_state(or_connection_t *conn, int started_here);
+int connection_init_or_handshake_state(or_connection_t *conn,
+ int started_here);
void connection_or_init_conn_from_address(or_connection_t *conn,
- const tor_addr_t *addr, uint16_t port,
+ const tor_addr_t *addr,
+ uint16_t port,
const char *id_digest,
int started_here);
int connection_or_client_learned_peer_id(or_connection_t *conn,
diff --git a/src/or/hibernate.c b/src/or/hibernate.c
index c8357e5be..6e4c9f22b 100644
--- a/src/or/hibernate.c
+++ b/src/or/hibernate.c
@@ -1017,3 +1017,4 @@ hibernate_set_state_for_testing_(hibernate_state_t newstate)
{
hibernate_state = newstate;
}
+
diff --git a/src/or/rendclient.c b/src/or/rendclient.c
index fc2657d0e..1038378de 100644
--- a/src/or/rendclient.c
+++ b/src/or/rendclient.c
@@ -366,8 +366,8 @@ rend_client_introduction_acked(origin_circuit_t *circ,
safe_str_client(circ->rend_data->onion_address),
safe_str_client(extend_info_describe(circ->build_state->chosen_exit)));
if (rend_client_report_intro_point_failure(circ->build_state->chosen_exit,
- circ->rend_data,
- INTRO_POINT_FAILURE_GENERIC)>0){
+ circ->rend_data,
+ INTRO_POINT_FAILURE_GENERIC)>0) {
/* There are introduction points left. Re-extend the circuit to
* another intro point and try again. */
int result = rend_client_reextend_intro_circuit(circ);