summaryrefslogtreecommitdiff
path: root/http-push.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-02-05 18:01:00 -0800
committerJunio C Hamano <gitster@pobox.com>2009-02-05 18:01:00 -0800
commit141b6b83d7ca5bd32d55a0a7e08384084d081557 (patch)
tree5c0aea567c793844ba1568c77b3eb3bea2e6fe81 /http-push.c
parentcc91e1bd0537442339c4fd233b98a4b30e9dbe29 (diff)
parent39c68542fc8d8477f2080c99efedb9dce975abc6 (diff)
downloadgit-141b6b83d7ca5bd32d55a0a7e08384084d081557.tar.gz
Merge branch 'lt/maint-wrap-zlib' into maint
* lt/maint-wrap-zlib: Wrap inflate and other zlib routines for better error reporting Conflicts: http-push.c http-walker.c sha1_file.c
Diffstat (limited to 'http-push.c')
-rw-r--r--http-push.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/http-push.c b/http-push.c
index 6ad853e2d0..cb5bf95a73 100644
--- a/http-push.c
+++ b/http-push.c
@@ -209,7 +209,7 @@ static size_t fwrite_sha1_file(void *ptr, size_t eltsize, size_t nmemb,
do {
request->stream.next_out = expn;
request->stream.avail_out = sizeof(expn);
- request->zret = inflate(&request->stream, Z_SYNC_FLUSH);
+ request->zret = git_inflate(&request->stream, Z_SYNC_FLUSH);
git_SHA1_Update(&request->c, expn,
sizeof(expn) - request->stream.avail_out);
} while (request->stream.avail_in && request->zret == Z_OK);
@@ -269,7 +269,7 @@ static void start_fetch_loose(struct transfer_request *request)
memset(&request->stream, 0, sizeof(request->stream));
- inflateInit(&request->stream);
+ git_inflate_init(&request->stream);
git_SHA1_Init(&request->c);
@@ -310,7 +310,7 @@ static void start_fetch_loose(struct transfer_request *request)
file; also rewind to the beginning of the local file. */
if (prev_read == -1) {
memset(&request->stream, 0, sizeof(request->stream));
- inflateInit(&request->stream);
+ git_inflate_init(&request->stream);
git_SHA1_Init(&request->c);
if (prev_posn>0) {
prev_posn = 0;
@@ -742,7 +742,7 @@ static void finish_request(struct transfer_request *request)
if (request->http_code == 416)
fprintf(stderr, "Warning: requested range invalid; we may already have all the data.\n");
- inflateEnd(&request->stream);
+ git_inflate_end(&request->stream);
git_SHA1_Final(request->real_sha1, &request->c);
if (request->zret != Z_STREAM_END) {
unlink(request->tmpfile);