From 7177ca3a70807f06746b5f753e786811cd98f90e Mon Sep 17 00:00:00 2001 From: aunsane Date: Sun, 21 Jan 2018 12:50:12 +0300 Subject: Tox: attempt to fix locked file when transfer is cancelled --- protocols/Tox/src/tox_transfer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'protocols/Tox/src/tox_transfer.cpp') diff --git a/protocols/Tox/src/tox_transfer.cpp b/protocols/Tox/src/tox_transfer.cpp index 6becdc1a26..908c54c37a 100644 --- a/protocols/Tox/src/tox_transfer.cpp +++ b/protocols/Tox/src/tox_transfer.cpp @@ -52,7 +52,7 @@ void CToxProto::OnFriendFile(Tox *tox, uint32_t friendNumber, uint32_t fileNumbe PROTORECVFILET pre = { 0 }; pre.dwFlags = PRFF_UNICODE; pre.fileCount = 1; - pre.timestamp = time(nullptr); + pre.timestamp = now(); pre.descr.w = L""; pre.files.w = &name; pre.lParam = (LPARAM)transfer; @@ -111,7 +111,7 @@ int CToxProto::OnFileResume(HANDLE hTransfer, int *action, const wchar_t **szFil debugLogA(__FUNCTION__": failed to open file (%d) from %s(%d)", transfer->fileNumber, (const char*)pubKey, transfer->friendNumber); tox_file_control(m_toxThread->Tox(), transfer->friendNumber, transfer->fileNumber, TOX_FILE_CONTROL_CANCEL, nullptr); transfers.Remove(transfer); - return NULL; + return 0; } TOX_ERR_FILE_CONTROL error; -- cgit v1.2.3