[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Reset buf->highwater every time buf_shrink is called, not j...
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] Reset buf->highwater every time buf_shrink is called, not j...
- From: nickm@xxxxxxxx (Nick Mathewson)
- Date: Wed, 8 Jun 2005 16:17:34 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Wed, 08 Jun 2005 16:17:45 -0400
- Reply-to: or-dev@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Update of /home/or/cvsroot/tor/src/or
In directory moria:/tmp/cvs-serv26197/src/or
Modified Files:
Tag: tor-0_1_0-patches
buffers.c
Log Message:
Reset buf->highwater every time buf_shrink is called, not just on suffessful shrink.
Index: buffers.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/buffers.c,v
retrieving revision 1.152
retrieving revision 1.152.2.1
diff -u -d -r1.152 -r1.152.2.1
--- buffers.c 3 May 2005 10:04:07 -0000 1.152
+++ buffers.c 8 Jun 2005 20:17:32 -0000 1.152.2.1
@@ -259,13 +259,13 @@
while (buf->highwater < (new_len>>2) && new_len > MIN_LAZY_SHRINK_SIZE*2)
new_len >>= 1;
+ buf->highwater = buf->datalen;
if (new_len == buf->len)
return;
log_fn(LOG_DEBUG,"Shrinking buffer from %d to %d bytes.",
(int)buf->len, (int)new_len);
buf_resize(buf, new_len);
- buf->highwater = buf->datalen;
}
/** Remove the first <b>n</b> bytes from buf.