summaryrefslogtreecommitdiff
path: root/src/common/torgzip.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-10-18 21:58:19 +0000
committerNick Mathewson <nickm@torproject.org>2005-10-18 21:58:19 +0000
commitedf56984749e86badfceabb644d5d2fdc0bc6d76 (patch)
tree191b7ace58e2ce3343277142a79f60ba12d20312 /src/common/torgzip.c
parent102df4a9823020cd7e2da4a2d37466f6fb91cb36 (diff)
downloadtor-edf56984749e86badfceabb644d5d2fdc0bc6d76.tar.gz
tor-edf56984749e86badfceabb644d5d2fdc0bc6d76.zip
Start dividing log messages into logging domains. No, LD_ is not the best of identifiers. src/or has not been converted yet. Domains dont do anything yet.
svn:r5284
Diffstat (limited to 'src/common/torgzip.c')
-rw-r--r--src/common/torgzip.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/common/torgzip.c b/src/common/torgzip.c
index 8ea35d75e7..b7c2d5e677 100644
--- a/src/common/torgzip.c
+++ b/src/common/torgzip.c
@@ -75,7 +75,7 @@ tor_gzip_compress(char **out, size_t *out_len,
if (method == GZIP_METHOD && !is_gzip_supported()) {
/* Old zlib version don't support gzip in deflateInit2 */
- log_fn(LOG_WARN, "Gzip not supported with zlib %s", ZLIB_VERSION);
+ warn(LD_GENERAL, "Gzip not supported with zlib %s", ZLIB_VERSION);
return -1;
}
@@ -91,7 +91,7 @@ tor_gzip_compress(char **out, size_t *out_len,
if (deflateInit2(stream, Z_BEST_COMPRESSION, Z_DEFLATED,
method_bits(method),
8, Z_DEFAULT_STRATEGY) != Z_OK) {
- log_fn(LOG_WARN, "Error from deflateInit2: %s",
+ warn(LD_GENERAL, "Error from deflateInit2: %s",
stream->msg?stream->msg:"<no message>");
goto err;
}
@@ -120,7 +120,7 @@ tor_gzip_compress(char **out, size_t *out_len,
stream->avail_out = out_size - offset;
break;
default:
- log_fn(LOG_WARN, "Gzip compression didn't finish: %s",
+ warn(LD_GENERAL, "Gzip compression didn't finish: %s",
stream->msg ? stream->msg : "<no message>");
goto err;
}
@@ -128,7 +128,7 @@ tor_gzip_compress(char **out, size_t *out_len,
done:
*out_len = stream->total_out;
if (deflateEnd(stream)!=Z_OK) {
- log_fn(LOG_WARN, "Error freeing gzip structures");
+ warn(LD_GENERAL, "Error freeing gzip structures");
goto err;
}
tor_free(stream);
@@ -168,7 +168,7 @@ tor_gzip_uncompress(char **out, size_t *out_len,
if (method == GZIP_METHOD && !is_gzip_supported()) {
/* Old zlib version don't support gzip in inflateInit2 */
- log_fn(LOG_WARN, "Gzip not supported with zlib %s", ZLIB_VERSION);
+ warn(LD_GENERAL, "Gzip not supported with zlib %s", ZLIB_VERSION);
return -1;
}
@@ -183,7 +183,7 @@ tor_gzip_uncompress(char **out, size_t *out_len,
if (inflateInit2(stream,
method_bits(method)) != Z_OK) {
- log_fn(LOG_WARN, "Error from inflateInit2: %s",
+ warn(LD_GENERAL, "Error from inflateInit2: %s",
stream->msg?stream->msg:"<no message>");
goto err;
}
@@ -203,7 +203,7 @@ tor_gzip_uncompress(char **out, size_t *out_len,
goto done;
/* There may be more compressed data here. */
if (inflateInit2(stream, method_bits(method)) != Z_OK) {
- log_fn(LOG_WARN, "Error from inflateInit2: %s",
+ warn(LD_GENERAL, "Error from inflateInit2: %s",
stream->msg?stream->msg:"<no message>");
goto err;
}
@@ -216,7 +216,7 @@ tor_gzip_uncompress(char **out, size_t *out_len,
break;
case Z_BUF_ERROR:
if (stream->avail_out > 0) {
- log_fn(LOG_WARN, "possible truncated or corrupt zlib data");
+ warn(LD_PROTOCOL, "possible truncated or corrupt zlib data");
goto err;
}
offset = stream->next_out - (unsigned char*)*out;
@@ -226,7 +226,7 @@ tor_gzip_uncompress(char **out, size_t *out_len,
stream->avail_out = out_size - offset;
break;
default:
- log_fn(LOG_WARN, "Gzip decompression returned an error: %s",
+ warn(LD_GENERAL, "Gzip decompression returned an error: %s",
stream->msg ? stream->msg : "<no message>");
goto err;
}
@@ -236,7 +236,7 @@ tor_gzip_uncompress(char **out, size_t *out_len,
r = inflateEnd(stream);
tor_free(stream);
if (r != Z_OK) {
- log_fn(LOG_WARN, "Error freeing gzip structures");
+ warn(LD_GENERAL, "Error freeing gzip structures");
goto err;
}