[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] print the IP if a conn fails badly, to see if there are any...
- To: or-cvs@freehaven.net
- Subject: [or-cvs] print the IP if a conn fails badly, to see if there are any...
- From: arma@seul.org (Roger Dingledine)
- Date: Wed, 29 Sep 2004 01:59:58 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Wed, 29 Sep 2004 02:00:18 -0400
- Reply-to: or-dev@freehaven.net
- Sender: owner-or-cvs@freehaven.net
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or
Modified Files:
main.c
Log Message:
print the IP if a conn fails badly, to see if there are any trends
Index: main.c
===================================================================
RCS file: /home/or/cvsroot/src/or/main.c,v
retrieving revision 1.328
retrieving revision 1.329
diff -u -d -r1.328 -r1.329
--- main.c 28 Sep 2004 21:14:40 -0000 1.328
+++ main.c 29 Sep 2004 05:59:55 -0000 1.329
@@ -297,6 +297,7 @@
static void conn_close_if_marked(int i) {
connection_t *conn;
int retval;
+ struct in_addr in;
conn = connection_array[i];
assert_connection_ok(conn, time(NULL));
@@ -308,11 +309,12 @@
if(conn->s >= 0 && connection_wants_to_flush(conn)) {
/* -1 means it's an incomplete edge connection, or that the socket
* has already been closed as unflushable. */
+ in.s_addr = htonl(conn->addr);
if(!conn->hold_open_until_flushed)
- log_fn(LOG_WARN,
- "Conn (fd %d, type %s, state %d) marked, but wants to flush %d bytes. "
+ log_fn(LOG_INFO,
+ "Conn (addr %s, fd %d, type %s, state %d) marked, but wants to flush %d bytes. "
"(Marked at %s:%d)",
- conn->s, CONN_TYPE_TO_STRING(conn->type), conn->state,
+ inet_ntoa(in), conn->s, CONN_TYPE_TO_STRING(conn->type), conn->state,
conn->outbuf_flushlen, conn->marked_for_close_file, conn->marked_for_close);
if(connection_speaks_cells(conn)) {
if(conn->state == OR_CONN_STATE_OPEN) {
@@ -329,8 +331,8 @@
return;
}
if(connection_wants_to_flush(conn)) {
- log_fn(LOG_WARN,"Conn (fd %d, type %s, state %d) still wants to flush. Losing %d bytes! (Marked at %s:%d)",
- conn->s, CONN_TYPE_TO_STRING(conn->type), conn->state,
+ log_fn(LOG_WARN,"Conn (addr %s, fd %d, type %s, state %d) still wants to flush. Losing %d bytes! (Marked at %s:%d)",
+ inet_ntoa(in), conn->s, CONN_TYPE_TO_STRING(conn->type), conn->state,
(int)buf_datalen(conn->outbuf), conn->marked_for_close_file,
conn->marked_for_close);
}