[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r13347: Bugfix from weasel: possible fix for 593: make connection_wr (in tor/trunk: . src/or)
Author: nickm
Date: 2008-02-01 00:27:12 -0500 (Fri, 01 Feb 2008)
New Revision: 13347
Modified:
tor/trunk/
tor/trunk/ChangeLog
tor/trunk/src/or/connection.c
tor/trunk/src/or/directory.c
Log:
r17863@catbus: nickm | 2008-02-01 00:27:07 -0500
Bugfix from weasel: possible fix for 593: make connection_write_to_buf("") work when using zlib compression.
Property changes on: tor/trunk
___________________________________________________________________
svk:merge ticket from /tor/trunk [r17863] on 8246c3cf-6607-4228-993b-4d95d33730f1
Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog 2008-02-01 04:44:43 UTC (rev 13346)
+++ tor/trunk/ChangeLog 2008-02-01 05:27:12 UTC (rev 13347)
@@ -14,6 +14,8 @@
- When our consensus networkstatus has been expired for a while, stop
being willing to build circuits using it. Fixes bug 401. Bugfix on
0.1.2.x.
+ - Stop incorrectly truncating zlib responses to directory authority
+ signature download requests. Fix for bug 593. Bugfix on 0.2.0.x.
Changes in version 0.2.0.18-alpha - 2008-01-25
Modified: tor/trunk/src/or/connection.c
===================================================================
--- tor/trunk/src/or/connection.c 2008-02-01 04:44:43 UTC (rev 13346)
+++ tor/trunk/src/or/connection.c 2008-02-01 05:27:12 UTC (rev 13347)
@@ -2250,7 +2250,7 @@
/* XXXX This function really needs to return -1 on failure. */
int r;
size_t old_datalen;
- if (!len)
+ if (!len && !(zlib<0))
return;
/* if it's marked for close, only allow write if we mean to flush it */
if (conn->marked_for_close && !conn->hold_open_until_flushed)
Modified: tor/trunk/src/or/directory.c
===================================================================
--- tor/trunk/src/or/directory.c 2008-02-01 04:44:43 UTC (rev 13346)
+++ tor/trunk/src/or/directory.c 2008-02-01 05:27:12 UTC (rev 13347)
@@ -2385,7 +2385,7 @@
estimated_len += body_len;
SMARTLIST_FOREACH(items, const char *, item, {
size_t ln = strlen(item);
- if (compressed ) {
+ if (compressed) {
estimated_len += ln/2;
} else {
body_len += ln; estimated_len += ln;