From 2e3ffdc6ecba747681a3f47c7bd902f5d5e05ddd Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Sun, 13 Jul 2014 21:50:56 +0000 Subject: [PATCH] since libz's been required in rpcimpl.c for ages and nobody's complained, remove the HAVE_ZLIB cruft for conditional-compiling with and without zlib. --- libtransmission/rpc-server.c | 12 +----------- libtransmission/rpcimpl.c | 4 +--- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/libtransmission/rpc-server.c b/libtransmission/rpc-server.c index 0a45798f0..20da6943b 100644 --- a/libtransmission/rpc-server.c +++ b/libtransmission/rpc-server.c @@ -13,9 +13,7 @@ #include /* close */ -#ifdef HAVE_ZLIB - #include -#endif +#include #include #include @@ -67,10 +65,8 @@ struct tr_rpc_server char * sessionId; time_t sessionIdExpiresAt; -#ifdef HAVE_ZLIB bool isStreamInitialized; z_stream stream; -#endif }; #define dbgmsg(...) \ @@ -331,9 +327,6 @@ add_response (struct evhttp_request * req, struct evbuffer * out, struct evbuffer * content) { -#ifndef HAVE_ZLIB - evbuffer_add_buffer (out, content); -#else const char * key = "Accept-Encoding"; const char * encoding = evhttp_find_header (req->input_headers, key); const int do_compress = encoding && strstr (encoding, "gzip"); @@ -400,7 +393,6 @@ add_response (struct evhttp_request * req, evbuffer_commit_space (out, iovec, 1); deflateReset (&server->stream); } -#endif } static void @@ -923,10 +915,8 @@ closeServer (void * vserver) stopServer (s); while ((tmp = tr_list_pop_front (&s->whitelist))) tr_free (tmp); -#ifdef HAVE_ZLIB if (s->isStreamInitialized) deflateEnd (&s->stream); -#endif tr_free (s->url); tr_free (s->sessionId); tr_free (s->whitelistStr); diff --git a/libtransmission/rpcimpl.c b/libtransmission/rpcimpl.c index 12bbed7bc..4fdf45cef 100644 --- a/libtransmission/rpcimpl.c +++ b/libtransmission/rpcimpl.c @@ -13,9 +13,7 @@ #include /* strtol */ #include /* strcmp */ -#ifdef HAVE_ZLIB - #include -#endif +#include #include -- 2.40.0