[or-cvs] and don"t warn when it happens here either, unless the user

arma at seul.org arma at seul.org
Sun Feb 12 23:43:19 UTC 2006


Update of /home2/or/cvsroot/tor/src/common
In directory moria:/home/arma/work/onion/cvs/tor/src/common

Modified Files:
	torgzip.c torgzip.h 
Log Message:
and don't warn when it happens here either, unless the user
wants to hear it.


Index: torgzip.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/common/torgzip.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -p -d -r1.27 -r1.28
--- torgzip.c	12 Feb 2006 23:34:03 -0000	1.27
+++ torgzip.c	12 Feb 2006 23:43:17 -0000	1.28
@@ -157,7 +157,8 @@ int
 tor_gzip_uncompress(char **out, size_t *out_len,
                     const char *in, size_t in_len,
                     compress_method_t method,
-                    int complete_only)
+                    int complete_only,
+                    int protocol_warn_level)
 {
   struct z_stream_s *stream = NULL;
   size_t out_size;
@@ -218,7 +219,8 @@ tor_gzip_uncompress(char **out, size_t *
           break;
       case Z_BUF_ERROR:
         if (stream->avail_out > 0) {
-          warn(LD_PROTOCOL, "possible truncated or corrupt zlib data");
+          log_fn(protocol_warn_level, LD_PROTOCOL,
+                 "possible truncated or corrupt zlib data");
           goto err;
         }
         offset = stream->next_out - (unsigned char*)*out;

Index: torgzip.h
===================================================================
RCS file: /home2/or/cvsroot/tor/src/common/torgzip.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -p -d -r1.9 -r1.10
--- torgzip.h	9 Feb 2006 05:46:48 -0000	1.9
+++ torgzip.h	12 Feb 2006 23:43:17 -0000	1.10
@@ -24,7 +24,8 @@ int
 tor_gzip_uncompress(char **out, size_t *out_len,
                     const char *in, size_t in_len,
                     compress_method_t method,
-                    int complete_only);
+                    int complete_only,
+                    int protocol_warn_level);
 
 int is_gzip_supported(void);
 



More information about the tor-commits mailing list