From 3bf0f5cfbe96b8aa8681f8fb26868188b52ec8e8 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 24 Oct 2017 14:19:53 +0200 Subject: [SERVER] Get rid of zlib dependency We only used it for CRC-32, so now the source tree includes a stripped down version of the crc32 code from the zlib project. --- src/server/uplink.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/server/uplink.c') diff --git a/src/server/uplink.c b/src/server/uplink.c index 2b50e8f..e899ed9 100644 --- a/src/server/uplink.c +++ b/src/server/uplink.c @@ -6,10 +6,10 @@ #include "../shared/sockhelper.h" #include "../shared/protocol.h" #include "../shared/timing.h" +#include "../shared/crc32.h" #include #include -#include #include #include @@ -702,8 +702,8 @@ static void uplink_addCrc32(dnbd3_connection_t *uplink) free( buffer ); return; } - uint32_t lists_crc = crc32( 0L, Z_NULL, 0 ); - lists_crc = crc32( lists_crc, (Bytef*)buffer, bytes ); + uint32_t lists_crc = crc32( 0, NULL, 0 ); + lists_crc = crc32( lists_crc, (uint8_t*)buffer, bytes ); lists_crc = net_order_32( lists_crc ); if ( lists_crc != masterCrc ) { logadd( LOG_WARNING, "Received corrupted crc32 list from uplink server (%s)!", uplink->image->name ); -- cgit v1.2.3-55-g7522