summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Jonathan Beck2008-10-31 18:52:28 +0100
committerGravatar Jonathan Beck2008-10-31 18:54:04 +0100
commit1eec0b50f81d225bdf62c039c413d5adc5648e77 (patch)
tree50bb71d47c20a8dfb2a4c7980a782e6e22dbc441
parent217f4ea74d3aca718bb2e4e9600f11aa212df8e2 (diff)
downloadlibimobiledevice-1eec0b50f81d225bdf62c039c413d5adc5648e77.tar.gz
libimobiledevice-1eec0b50f81d225bdf62c039c413d5adc5648e77.tar.bz2
reduce chunk size in AFC since it was generating error for large file
fix include in afccheck.c
-rw-r--r--dev/afccheck.c1
-rw-r--r--src/AFC.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/dev/afccheck.c b/dev/afccheck.c
index 028110a..0ff420a 100644
--- a/dev/afccheck.c
+++ b/dev/afccheck.c
@@ -19,6 +19,7 @@
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */ 20 */
21 21
22#include <stdlib.h>
22#include <stdio.h> 23#include <stdio.h>
23#include <string.h> 24#include <string.h>
24#include <glib.h> 25#include <glib.h>
diff --git a/src/AFC.c b/src/AFC.c
index 144efe1..54ea1bb 100644
--- a/src/AFC.c
+++ b/src/AFC.c
@@ -794,7 +794,7 @@ iphone_afc_write_file(iphone_afc_client_t client, iphone_afc_file_t file,
794 const char *data, int length, uint32_t * bytes) 794 const char *data, int length, uint32_t * bytes)
795{ 795{
796 char *acknowledgement = NULL; 796 char *acknowledgement = NULL;
797 const int MAXIMUM_WRITE_SIZE = 1 << 16; 797 const int MAXIMUM_WRITE_SIZE = 1 << 15;
798 uint32 zero = 0, bytes_loc = 0, segments = (length / MAXIMUM_WRITE_SIZE), current_count = 0, i = 0; 798 uint32 zero = 0, bytes_loc = 0, segments = (length / MAXIMUM_WRITE_SIZE), current_count = 0, i = 0;
799 char *out_buffer = NULL; 799 char *out_buffer = NULL;
800 800