From 955f4ff05add89bb665a0a9f7a3aeffb009fc8c3 Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Tue, 17 Jul 2012 16:22:42 +0200 Subject: download: Let libcurl use it's own file writing functions instead of fwrite This apparently fixes some issues leading to corrupt downloads. --- src/download.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/download.c') diff --git a/src/download.c b/src/download.c index 849088e..206086e 100644 --- a/src/download.c +++ b/src/download.c @@ -122,7 +122,7 @@ int download_to_file(const char* url, const char* filename, int enable_progress) if (idevicerestore_debug) curl_easy_setopt(handle, CURLOPT_VERBOSE, 1); - curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, (curl_write_callback)&fwrite); + curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, NULL); curl_easy_setopt(handle, CURLOPT_WRITEDATA, f); if (enable_progress > 0) -- cgit v1.1-32-gdbae