1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-26 18:33:27 +01:00

Merge pull request #57 from aitjcize/ret-code-inconsistency

Fix API ret code changes of ToxCore
This commit is contained in:
irungentoo 2013-11-29 07:05:48 -08:00
commit 4babd53be6
2 changed files with 3 additions and 3 deletions

View File

@ -113,7 +113,7 @@ void cmd_savefile(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv
uint8_t *filename = friends[self->num].file_receiver.filenames[filenum];
if (tox_file_sendcontrol(m, self->num, 1, filenum, TOX_FILECONTROL_ACCEPT, 0, 0))
if (tox_file_sendcontrol(m, self->num, 1, filenum, TOX_FILECONTROL_ACCEPT, 0, 0) == 0)
wprintw(window, "Accepted file transfer %u. Saving file as: '%s'\n", filenum, filename);
else
wprintw(window, "File transfer failed.\n");

View File

@ -395,8 +395,8 @@ static void do_file_senders(Tox *m)
int pieces = 0;
while (pieces++ < MAX_PIECES_SEND) {
if (!tox_file_senddata(m, friendnum, filenum, file_senders[i].nextpiece,
file_senders[i].piecelen))
if (tox_file_senddata(m, friendnum, filenum, file_senders[i].nextpiece,
file_senders[i].piecelen) == -1)
break;
file_senders[i].timestamp = current_time;