1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-07-12 13:36:45 +02:00

Send file control cancel when we block or delete a friend

This commit is contained in:
jfreegman
2021-12-22 14:53:09 -05:00
parent 6f8f6f0ac5
commit 602d9d97c1
2 changed files with 9 additions and 4 deletions

View File

@ -349,7 +349,11 @@ void close_file_transfer(ToxWindow *self, Tox *m, FileTransfer *ft, int CTRL, co
}
if (CTRL >= 0) {
tox_file_control(m, ft->friendnumber, ft->filenumber, (Tox_File_Control) CTRL, NULL);
Tox_Err_File_Control err;
if (!tox_file_control(m, ft->friendnumber, ft->filenumber, (Tox_File_Control) CTRL, &err)) {
fprintf(stderr, "Failed to cancel file transfer: %d\n", err);
}
}
if (message && self) {