[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] Backport fix to allow clients and mirrors to learn director...



Update of /home/or/cvsroot/tor/src/or
In directory moria:/tmp/cvs-serv22959/src/or

Modified Files:
      Tag: tor-0_1_1-patches
	directory.c 
Log Message:
Backport fix to allow clients and mirrors to learn directory info from descriptor downloads that get cut off partway through.

Index: directory.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/directory.c,v
retrieving revision 1.370.2.1
retrieving revision 1.370.2.2
diff -u -p -d -r1.370.2.1 -r1.370.2.2
--- directory.c	18 Apr 2006 03:05:34 -0000	1.370.2.1
+++ directory.c	3 Jul 2006 01:18:17 -0000	1.370.2.2
@@ -913,12 +913,12 @@ connection_dir_client_reached_eof(connec
     /* Try declared compression first if we can. */
     if (compression > 0)
       tor_gzip_uncompress(&new_body, &new_len, body, body_len, compression,
-                          allow_partial, LOG_PROTOCOL_WARN);
+                          !allow_partial, LOG_PROTOCOL_WARN);
     /* Okay, if that didn't work, and we think that it was compressed
      * differently, try that. */
     if (!new_body && guessed > 0 && compression != guessed)
       tor_gzip_uncompress(&new_body, &new_len, body, body_len, guessed,
-                          allow_partial, LOG_PROTOCOL_WARN);
+                          !allow_partial, LOG_PROTOCOL_WARN);
     /* If we're pretty sure that we have a compressed directory, and
      * we didn't manage to uncompress it, then warn and bail. */
     if (!plausible && !new_body) {