summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_transfer.cpp
diff options
context:
space:
mode:
authoraunsane <aunsane@gmail.com>2018-01-21 12:50:12 +0300
committeraunsane <aunsane@gmail.com>2018-01-21 12:50:54 +0300
commit7177ca3a70807f06746b5f753e786811cd98f90e (patch)
tree6a0360a3353a79f05b8e1ee330f80211ea806d36 /protocols/Tox/src/tox_transfer.cpp
parent087173d06f4848f19d186b6902d399ce9b7225e1 (diff)
Tox: attempt to fix locked file when transfer is cancelled
Diffstat (limited to 'protocols/Tox/src/tox_transfer.cpp')
-rw-r--r--protocols/Tox/src/tox_transfer.cpp4
1 files changed, 2 insertions, 2 deletions
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;