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

a few small filetransfer fixes

This commit is contained in:
Jfreegman 2015-03-29 19:29:38 -04:00
parent e3130c92c0
commit bdb0951c84
No known key found for this signature in database
GPG Key ID: 3627F3144076AE63
2 changed files with 2 additions and 0 deletions

View File

@ -499,6 +499,7 @@ static void chat_onFileRecv(ToxWindow *self, Tox *m, uint32_t friendnum, uint32_
ft->state = FILE_TRANSFER_PENDING; ft->state = FILE_TRANSFER_PENDING;
ft->direction = FILE_TRANSFER_RECV; ft->direction = FILE_TRANSFER_RECV;
ft->file_size = file_size; ft->file_size = file_size;
ft->friendnum = friendnum;
ft->filenum = filenum; ft->filenum = filenum;
snprintf(ft->file_path, sizeof(ft->file_path), "%s", file_path); snprintf(ft->file_path, sizeof(ft->file_path), "%s", file_path);
snprintf(ft->file_name, sizeof(ft->file_name), "%s", filename); snprintf(ft->file_name, sizeof(ft->file_name), "%s", filename);

View File

@ -275,6 +275,7 @@ void cmd_sendfile(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv
ft->file = file_to_send; ft->file = file_to_send;
ft->file_size = filesize; ft->file_size = filesize;
ft->filenum = filenum; ft->filenum = filenum;
ft->friendnum = self->num;
ft->direction = FILE_TRANSFER_SEND; ft->direction = FILE_TRANSFER_SEND;
char sizestr[32]; char sizestr[32];