summaryrefslogtreecommitdiff
path: root/src/common/torgzip.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2006-02-12 23:44:02 +0000
committerRoger Dingledine <arma@torproject.org>2006-02-12 23:44:02 +0000
commitb99f903e34b1d2b4548937480d2345ab4753454f (patch)
treeed002b0bea9e40145b7344c7799ff948567800c9 /src/common/torgzip.c
parent53c54b75c9e3ba373cc43633eacc290f175fbb14 (diff)
downloadtor-b99f903e34b1d2b4548937480d2345ab4753454f.tar.gz
tor-b99f903e34b1d2b4548937480d2345ab4753454f.zip
and don't warn when it happens here either, unless the user
wants to hear it. svn:r5990
Diffstat (limited to 'src/common/torgzip.c')
-rw-r--r--src/common/torgzip.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/common/torgzip.c b/src/common/torgzip.c
index f9cd247731..a524deba3f 100644
--- a/src/common/torgzip.c
+++ b/src/common/torgzip.c
@@ -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 *out_len,
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;