summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_account.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Tox/src/tox_account.cpp')
-rw-r--r--protocols/Tox/src/tox_account.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/protocols/Tox/src/tox_account.cpp b/protocols/Tox/src/tox_account.cpp
index 2aa3081442..49eb5fa146 100644
--- a/protocols/Tox/src/tox_account.cpp
+++ b/protocols/Tox/src/tox_account.cpp
@@ -115,6 +115,18 @@ bool CToxProto::InitToxCore()
void CToxProto::UninitToxCore()
{
+ for (size_t i = 0; i < transfers->Count(); i++)
+ {
+ FileTransferParam *transfer = transfers->GetAt(i);
+ {
+ mir_cslock(transfer->fileLock);
+
+ transfer->Cancel(tox);
+ ProtoBroadcastAck(transfer->pfts.hContact, ACKTYPE_FILE, ACKRESULT_DENIED, (HANDLE)transfer, 0);
+ }
+ transfers->Remove(transfer);
+ }
+
ptrA nickname(mir_utf8encodeW(ptrT(getTStringA("Nick"))));
tox_set_name(tox, (uint8_t*)(char*)nickname, mir_strlen(nickname));