1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-12-23 15:53:26 +01:00

Fix API ret code changes of ToxCore

This commit is contained in:
AZ Huang 2013-11-29 18:30:40 +08:00
parent b909ab37b7
commit e29ce6ab6f
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;