|
@@ -832,9 +832,8 @@ safe_or_connection_update_state(safe_or_connection_t *safe_or_conn,
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
- log_warn(LD_OR, "Safe OR conn changed from state %d to state %d",
|
|
|
+ log_debug(LD_OR, "Safe OR conn changed from state %d to state %d",
|
|
|
safe_or_conn->state, new_state);
|
|
|
- // TODO: change back to debug ^^
|
|
|
safe_or_conn->state = new_state;
|
|
|
|
|
|
return E_SUCCESS;
|
|
@@ -1005,9 +1004,6 @@ safe_or_connection_read_encrypted(safe_or_connection_t *safe_or_conn,
|
|
|
safe_or_connection_max_bytes_can_read(safe_or_conn, use_conn_buckets);
|
|
|
// we may read slightly more than this due to pending TLS bytes
|
|
|
|
|
|
- log_warn(LD_NET, "suggested_bytes_to_read: %zu", suggested_bytes_to_read);
|
|
|
- // TODO: remove this ^^
|
|
|
-
|
|
|
if (suggested_bytes_to_read == 0) {
|
|
|
log_debug(LD_NET, "Read callback running, but not supposed to read bytes.");
|
|
|
return E_SUCCESS;
|
|
@@ -1061,9 +1057,8 @@ safe_or_connection_read_encrypted(safe_or_connection_t *safe_or_conn,
|
|
|
size_t tls_bytes_written = 0;
|
|
|
tor_tls_get_n_raw_bytes(safe_or_conn->tls, &tls_bytes_read,
|
|
|
&tls_bytes_written);
|
|
|
- log_warn(LD_NET, "After TLS read of %zu: %zu read, %zu written",
|
|
|
+ log_debug(LD_NET, "After TLS read of %zu: %zu read, %zu written",
|
|
|
bytes_read, tls_bytes_read, tls_bytes_written);
|
|
|
- // TODO: change this back to debug ^^
|
|
|
|
|
|
safe_or_connection_decrement_buckets(safe_or_conn, tls_bytes_read,
|
|
|
tls_bytes_written, use_conn_buckets);
|
|
@@ -1085,9 +1080,6 @@ safe_or_connection_write_encrypted(safe_or_connection_t *safe_or_conn,
|
|
|
size_t max_bytes_to_write = \
|
|
|
safe_or_connection_max_bytes_can_write(safe_or_conn, use_conn_buckets);
|
|
|
|
|
|
- log_warn(LD_NET, "max_bytes_to_write: %zu", max_bytes_to_write);
|
|
|
- // TODO: remove this ^^
|
|
|
-
|
|
|
if (max_bytes_to_write == 0) {
|
|
|
log_debug(LD_NET, "Write callback running, but not supposed to write bytes.");
|
|
|
return E_SUCCESS;
|
|
@@ -1112,14 +1104,10 @@ safe_or_connection_write_encrypted(safe_or_connection_t *safe_or_conn,
|
|
|
case TOR_TLS_WANTWRITE:
|
|
|
// we need to wait for the socket to become writable
|
|
|
// again, then do another write
|
|
|
- log_warn(LD_NET, "Wants write");
|
|
|
- // TODO: remove this ^^
|
|
|
break;
|
|
|
case TOR_TLS_WANTREAD:
|
|
|
// we need to wait for the socket to become readable
|
|
|
// before we can do another write
|
|
|
- log_warn(LD_NET, "Wants read");
|
|
|
- // TODO: remove this ^^
|
|
|
socket_rw_state_set(&safe_or_conn->tls_read_wanted, true,
|
|
|
TO_SAFE_CONN(safe_or_conn));
|
|
|
socket_rw_state_set(&safe_or_conn->tor_write_wanted, false,
|
|
@@ -1157,9 +1145,8 @@ safe_or_connection_write_encrypted(safe_or_connection_t *safe_or_conn,
|
|
|
size_t tls_bytes_written = 0;
|
|
|
tor_tls_get_n_raw_bytes(safe_or_conn->tls, &tls_bytes_read,
|
|
|
&tls_bytes_written);
|
|
|
- log_warn(LD_NET, "After TLS write of %zu: %zu read, %zu written",
|
|
|
+ log_debug(LD_NET, "After TLS write of %zu: %zu read, %zu written",
|
|
|
bytes_written, tls_bytes_read, tls_bytes_written);
|
|
|
- // TODO: change this back to debug ^^
|
|
|
|
|
|
safe_or_connection_decrement_buckets(safe_or_conn, tls_bytes_read,
|
|
|
tls_bytes_written, use_conn_buckets);
|
|
@@ -1266,10 +1253,9 @@ safe_or_connection_read_cb(safe_connection_t *safe_conn)
|
|
|
tor_assert(safe_conn != NULL);
|
|
|
safe_or_connection_t *safe_or_conn = TO_SAFE_OR_CONN(safe_conn);
|
|
|
|
|
|
- log_warn(LD_OR, "OR Connection Read (state=%d, obj=%p, %s)!!!!",
|
|
|
- safe_or_conn->state, safe_or_conn,
|
|
|
- safe_or_conn->is_outgoing?"outgoing":"incoming");
|
|
|
- // TODO: remove this ^^
|
|
|
+ log_debug(LD_OR, "OR connection read cb (state=%d, obj=%p, %s)",
|
|
|
+ safe_or_conn->state, safe_or_conn,
|
|
|
+ safe_or_conn->is_outgoing?"outgoing":"incoming");
|
|
|
|
|
|
//if (safe_or_conn->tls_write_waiting_on_socket_readable) {
|
|
|
// // since the socket is now readable, we can re-enable TLS write again
|
|
@@ -1362,10 +1348,9 @@ safe_or_connection_write_cb(safe_connection_t *safe_conn)
|
|
|
tor_assert(safe_conn != NULL);
|
|
|
safe_or_connection_t *safe_or_conn = TO_SAFE_OR_CONN(safe_conn);
|
|
|
|
|
|
- log_warn(LD_OR, "OR Connection Write (state=%d, obj=%p, %s)!!!!",
|
|
|
- safe_or_conn->state, safe_or_conn,
|
|
|
- safe_or_conn->is_outgoing?"outgoing":"incoming");
|
|
|
- // TODO: remove this ^^
|
|
|
+ log_debug(LD_OR, "OR connection write cb (state=%d, obj=%p, %s)",
|
|
|
+ safe_or_conn->state, safe_or_conn,
|
|
|
+ safe_or_conn->is_outgoing?"outgoing":"incoming");
|
|
|
|
|
|
switch (safe_or_conn->state) {
|
|
|
case SAFE_OR_CONN_STATE_UNINITIALIZED:
|