[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] correct a warn message in mark_if_closed
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:
correct a warn message in mark_if_closed
Index: main.c
===================================================================
RCS file: /home/or/cvsroot/src/or/main.c,v
retrieving revision 1.159
retrieving revision 1.160
diff -u -d -r1.159 -r1.160
--- main.c 14 Dec 2003 09:58:43 -0000 1.159
+++ main.c 23 Dec 2003 07:42:01 -0000 1.160
@@ -220,8 +220,10 @@
} else {
flush_buf(conn->s, conn->outbuf, &conn->outbuf_flushlen);
}
- if(connection_wants_to_flush(conn)) /* not done flushing */
- log_fn(LOG_WARN,"Conn (socket %d) still wants to flush. Losing %d bytes!",conn->s, (int)buf_datalen(conn->inbuf));
+ if(connection_wants_to_flush(conn) && buf_datalen(conn->outbuf)) {
+ log_fn(LOG_WARN,"Conn (socket %d) still wants to flush. Losing %d bytes!",
+ conn->s, (int)buf_datalen(conn->outbuf));
+ }
}
connection_remove(conn);
connection_free(conn);
@@ -606,11 +608,11 @@
if (stats_n_data_cells_packaged)
log(severity,"Average outgoing cell fullness: %2.3f%%",
100*(((double)stats_n_data_bytes_packaged) /
- (stats_n_data_cells_packaged*(CELL_PAYLOAD_SIZE-RELAY_HEADER_SIZE))) );
+ (stats_n_data_cells_packaged*RELAY_PAYLOAD_SIZE)) );
if (stats_n_data_cells_received)
log(severity,"Average incoming cell fullness: %2.3f%%",
100*(((double)stats_n_data_bytes_received) /
- (stats_n_data_cells_received*(CELL_PAYLOAD_SIZE-RELAY_HEADER_SIZE))) );
+ (stats_n_data_cells_received*RELAY_PAYLOAD_SIZE)) );
if (stats_n_seconds_reading)
log(severity,"Average bandwidth used: %d bytes/sec",