summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--testing/tox_sync.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/testing/tox_sync.c b/testing/tox_sync.c
index 2799e7fe..349f84d9 100644
--- a/testing/tox_sync.c
+++ b/testing/tox_sync.c
@@ -46,7 +46,7 @@ typedef struct {
46 FILE *file; 46 FILE *file;
47 uint16_t friendnum; 47 uint16_t friendnum;
48 uint8_t filenumber; 48 uint8_t filenumber;
49 uint8_t nextpiece[1024]; 49 uint8_t nextpiece[1400];
50 uint16_t piecelength; 50 uint16_t piecelength;
51} File_t; 51} File_t;
52File_t file_senders[NUM_FILE_SENDERS]; 52File_t file_senders[NUM_FILE_SENDERS];
@@ -62,8 +62,8 @@ void send_filesenders(Tox *m)
62 continue; 62 continue;
63 63
64 while (1) { 64 while (1) {
65 if (!tox_file_send_data(m, file_senders[i].friendnum, file_senders[i].filenumber, file_senders[i].nextpiece, 65 if (tox_file_send_data(m, file_senders[i].friendnum, file_senders[i].filenumber, file_senders[i].nextpiece,
66 file_senders[i].piecelength)) 66 file_senders[i].piecelength) != 0)
67 break; 67 break;
68 68
69 file_senders[i].piecelength = fread(file_senders[i].nextpiece, 1, tox_file_data_size(m, file_senders[i].friendnum), 69 file_senders[i].piecelength = fread(file_senders[i].nextpiece, 1, tox_file_data_size(m, file_senders[i].friendnum),
@@ -160,7 +160,7 @@ void file_request_accept(Tox *m, int friendnumber, uint8_t filenumber, uint64_t
160 return; 160 return;
161 } 161 }
162 162
163 if (tox_file_send_control(m, friendnumber, 1, filenumber, TOX_FILECONTROL_ACCEPT, 0, 0)) { 163 if (tox_file_send_control(m, friendnumber, 1, filenumber, TOX_FILECONTROL_ACCEPT, 0, 0) == 0) {
164 printf("Accepted file transfer. (file: %s)\n", fullpath); 164 printf("Accepted file transfer. (file: %s)\n", fullpath);
165 } 165 }
166 166