summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-03-06 01:43:37 +0000
committerRoger Dingledine <arma@torproject.org>2004-03-06 01:43:37 +0000
commit6c9d78b319dd883afd17d29829b3bdc017b07189 (patch)
tree7eb91a290f51f3f9ea99d0b5261db4bd74f9bf02
parent1e5b7bc6f1ad8c2d419f6e4a78b314ae3480033e (diff)
downloadtor-6c9d78b319dd883afd17d29829b3bdc017b07189.tar.gz
tor-6c9d78b319dd883afd17d29829b3bdc017b07189.zip
stop asserting that computers always go forward in time
it's simply not true svn:r1236
-rw-r--r--src/or/connection.c2
-rw-r--r--src/or/connection_or.c3
-rw-r--r--src/or/cpuworker.c4
-rw-r--r--src/or/dns.c2
-rw-r--r--src/or/main.c2
5 files changed, 8 insertions, 5 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index c05736e02a..7dc177d4dc 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -870,10 +870,12 @@ void assert_connection_ok(connection_t *conn, time_t now)
assert_buf_ok(conn->outbuf);
}
+#if 0 /* computers often go back in time; no way to know */
assert(!now || conn->timestamp_lastread <= now);
assert(!now || conn->timestamp_lastwritten <= now);
assert(conn->timestamp_created <= conn->timestamp_lastread);
assert(conn->timestamp_created <= conn->timestamp_lastwritten);
+#endif
/* XXX Fix this; no longer so.*/
#if 0
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index f7fdcc1d89..7610087e91 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -154,8 +154,9 @@ int connection_tls_start_handshake(connection_t *conn, int receiving) {
}
connection_start_reading(conn);
log_fn(LOG_DEBUG,"starting the handshake");
- if(connection_tls_continue_handshake(conn) < 0)
+ if(connection_tls_continue_handshake(conn) < 0) {
return -1;
+ }
return 0;
}
diff --git a/src/or/cpuworker.c b/src/or/cpuworker.c
index 2e80f72d43..77e185fdf2 100644
--- a/src/or/cpuworker.c
+++ b/src/or/cpuworker.c
@@ -58,12 +58,12 @@ int connection_cpu_process_inbuf(connection_t *conn) {
assert(conn && conn->type == CONN_TYPE_CPUWORKER);
if(conn->inbuf_reached_eof) {
- log_fn(LOG_WARN,"Read eof. Worker has died.");
+ log_fn(LOG_WARN,"Read eof. Worker died unexpectedly.");
if(conn->state != CPUWORKER_STATE_IDLE) {
/* the circ associated with this cpuworker will have to wait until
* it gets culled in run_connection_housekeeping(), since we have
* no way to find out which circ it was. */
- log_fn(LOG_WARN,"...and leaving a circuit waiting. Oh well.");
+ log_fn(LOG_WARN,"...and it left a circuit queued; abandoning circ.");
num_cpuworkers_busy--;
}
num_cpuworkers--;
diff --git a/src/or/dns.c b/src/or/dns.c
index 4eed20d6ec..48a458a0c1 100644
--- a/src/or/dns.c
+++ b/src/or/dns.c
@@ -353,7 +353,7 @@ int connection_dns_process_inbuf(connection_t *conn) {
assert(conn && conn->type == CONN_TYPE_DNSWORKER);
if(conn->inbuf_reached_eof) {
- log_fn(LOG_WARN,"Read eof. Worker dying.");
+ log_fn(LOG_WARN,"Read eof. Worker died unexpectedly.");
if(conn->state == DNSWORKER_STATE_BUSY) {
dns_cancel_pending_resolve(conn->address);
num_dnsworkers_busy--;
diff --git a/src/or/main.c b/src/or/main.c
index 18e643bb1b..0a74d44747 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -247,7 +247,7 @@ static void conn_close_if_marked(int i) {
retval = flush_buf_tls(conn->tls, conn->outbuf, &conn->outbuf_flushlen);
/* XXX actually, some non-zero results are maybe ok. which ones? */
} else
- retval = -1;
+ retval = -1; /* never flush non-open broken tls connections */
} else {
retval = flush_buf(conn->s, conn->outbuf, &conn->outbuf_flushlen);
}