summaryrefslogtreecommitdiff
path: root/testing/nTox.c
diff options
context:
space:
mode:
Diffstat (limited to 'testing/nTox.c')
-rw-r--r--testing/nTox.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/testing/nTox.c b/testing/nTox.c
index 2dd8b874..6e333abf 100644
--- a/testing/nTox.c
+++ b/testing/nTox.c
@@ -131,8 +131,8 @@ void send_filesenders(Tox *m)
131 continue; 131 continue;
132 132
133 while (1) { 133 while (1) {
134 if (!tox_file_senddata(m, file_senders[i].friendnum, file_senders[i].filenumber, file_senders[i].nextpiece, 134 if (tox_file_senddata(m, file_senders[i].friendnum, file_senders[i].filenumber, file_senders[i].nextpiece,
135 file_senders[i].piecelength)) 135 file_senders[i].piecelength) == -1)
136 break; 136 break;
137 137
138 file_senders[i].piecelength = fread(file_senders[i].nextpiece, 1, tox_filedata_size(m, file_senders[i].friendnum), 138 file_senders[i].piecelength = fread(file_senders[i].nextpiece, 1, tox_filedata_size(m, file_senders[i].friendnum),
@@ -1182,7 +1182,7 @@ void file_request_accept(Tox *m, int friendnumber, uint8_t filenumber, uint64_t
1182 sprintf(msg, "[t] %u is sending us: %s of size %llu", friendnumber, filename, (long long unsigned int)filesize); 1182 sprintf(msg, "[t] %u is sending us: %s of size %llu", friendnumber, filename, (long long unsigned int)filesize);
1183 new_lines(msg); 1183 new_lines(msg);
1184 1184
1185 if (tox_file_sendcontrol(m, friendnumber, 1, filenumber, 0, 0, 0)) { 1185 if (tox_file_sendcontrol(m, friendnumber, 1, filenumber, 0, 0, 0) == 0) {
1186 sprintf(msg, "Accepted file transfer. (saving file as: %u.%u.bin)", friendnumber, filenumber); 1186 sprintf(msg, "Accepted file transfer. (saving file as: %u.%u.bin)", friendnumber, filenumber);
1187 new_lines(msg); 1187 new_lines(msg);
1188 } else 1188 } else