[or-cvs] add a debugging entry, to find the wants-to-read-but-can"t ...
Roger Dingledine
arma at seul.org
Mon Apr 26 21:15:09 UTC 2004
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or
Modified Files:
buffers.c connection.c
Log Message:
add a debugging entry, to find the wants-to-read-but-can't bug
Index: buffers.c
===================================================================
RCS file: /home/or/cvsroot/src/or/buffers.c,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -d -r1.79 -r1.80
--- buffers.c 25 Apr 2004 20:37:37 -0000 1.79
+++ buffers.c 26 Apr 2004 21:15:06 -0000 1.80
@@ -385,8 +385,10 @@
log_fn(LOG_DEBUG,"body not all here yet.");
return 0; /* not all there yet */
}
- bodylen = contentlen;
- log_fn(LOG_DEBUG,"bodylen reduced to %d.",bodylen);
+ if(bodylen > contentlen) {
+ bodylen = contentlen;
+ log_fn(LOG_DEBUG,"bodylen reduced to %d.",bodylen);
+ }
}
/* all happy. copy into the appropriate places, and return 1 */
if(headers_out) {
Index: connection.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection.c,v
retrieving revision 1.202
retrieving revision 1.203
diff -u -d -r1.202 -r1.203
--- connection.c 26 Apr 2004 04:32:01 -0000 1.202
+++ connection.c 26 Apr 2004 21:15:06 -0000 1.203
@@ -628,6 +628,9 @@
return connection_tls_continue_handshake(conn);
}
+ log_fn(LOG_DEBUG,"%d: starting, inbuf_datalen %d (%d pending in tls object). at_most %d.",
+ conn->s,(int)buf_datalen(conn->inbuf),tor_tls_get_pending_bytes(conn->tls), at_most);
+
/* else open, or closing */
result = read_to_buf_tls(conn->tls, at_most, conn->inbuf);
More information about the tor-commits
mailing list