summaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-02-28 07:01:22 +0000
committerRoger Dingledine <arma@torproject.org>2004-02-28 07:01:22 +0000
commitdd632e697e6e7e96f755fab1a618e71fef169cdc (patch)
tree79b8f0d3823667921bf1ff064597d2632528e1ae /src/or/connection.c
parenta24b6e6d4fd9d65e9f0eef45f46720cd5007e175 (diff)
downloadtor-dd632e697e6e7e96f755fab1a618e71fef169cdc.tar.gz
tor-dd632e697e6e7e96f755fab1a618e71fef169cdc.zip
clean up some log messages and severities
still plenty more left to clean svn:r1158
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index ed96ed482e..3b1f6d9631 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -407,8 +407,8 @@ int connection_handle_read(connection_t *conn) {
if(connection_read_to_buf(conn) < 0) {
if(conn->type == CONN_TYPE_DIR &&
- (conn->state == DIR_CONN_STATE_CONNECTING_FETCH ||
- conn->state == DIR_CONN_STATE_CONNECTING_UPLOAD)) {
+ (conn->state == DIR_CONN_STATE_CONNECTING_FETCH ||
+ conn->state == DIR_CONN_STATE_CONNECTING_UPLOAD)) {
/* it's a directory server and connecting failed: forget about this router */
/* XXX I suspect pollerr may make Windows not get to this point. :( */
router_mark_as_down(conn->nickname);
@@ -512,10 +512,7 @@ int connection_outbuf_too_full(connection_t *conn) {
/* return -1 if you want to break the conn, else return 0 */
int connection_handle_write(connection_t *conn) {
- if(connection_is_listener(conn)) {
- log_fn(LOG_WARN,"Got a listener socket. Can't happen!");
- return -1;
- }
+ assert(!connection_is_listener(conn));
conn->timestamp_lastwritten = time(NULL);
@@ -631,7 +628,7 @@ connection_t *connection_twin_get_by_addr_port(uint32_t addr, uint16_t port) {
/* first check if it's there exactly */
conn = connection_exact_get_by_addr_port(addr,port);
if(conn && connection_state_is_open(conn)) {
- log(LOG_INFO,"connection_twin_get_by_addr_port(): Found exact match.");
+ log(LOG_DEBUG,"connection_twin_get_by_addr_port(): Found exact match.");
return conn;
}
@@ -647,7 +644,7 @@ connection_t *connection_twin_get_by_addr_port(uint32_t addr, uint16_t port) {
assert(conn);
if(connection_state_is_open(conn) &&
!crypto_pk_cmp_keys(conn->onion_pkey, router->onion_pkey)) {
- log(LOG_INFO,"connection_twin_get_by_addr_port(): Found twin (%s).",conn->address);
+ log(LOG_DEBUG,"connection_twin_get_by_addr_port(): Found twin (%s).",conn->address);
return conn;
}
}
@@ -808,7 +805,7 @@ void assert_connection_ok(connection_t *conn, time_t now)
{
assert(conn);
assert(conn->magic == CONNECTION_MAGIC);
- return;
+ return; /* XXX !!! */
assert(conn->type >= _CONN_TYPE_MIN);
assert(conn->type <= _CONN_TYPE_MAX);