diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-02-17 21:16:52 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-02-17 21:16:52 +0000 |
commit | 0bd7314a45df9f2b01aa2a1728fe46fe18c3cf67 (patch) | |
tree | 8f8a8ccf27f1ca48811ab58e7d63c64566ea8fb1 /protocols/Tox/src/tox_transfer.cpp | |
parent | d92361fbcc16534d127d62f731d26579d1569d6d (diff) |
Tox: fix to simultaneous file transfer to different contacts
git-svn-id: http://svn.miranda-ng.org/main/trunk@12171 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_transfer.cpp')
-rw-r--r-- | protocols/Tox/src/tox_transfer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/protocols/Tox/src/tox_transfer.cpp b/protocols/Tox/src/tox_transfer.cpp index e85babb1de..580e3aae75 100644 --- a/protocols/Tox/src/tox_transfer.cpp +++ b/protocols/Tox/src/tox_transfer.cpp @@ -126,7 +126,7 @@ void CToxProto::OnFileData(Tox *tox, int32_t friendNumber, uint8_t fileNumber, c return;
}
- FileTransferParam *transfer = proto->transfers->Get(fileNumber);
+ FileTransferParam *transfer = proto->transfers->Get(friendNumber, fileNumber);
if (transfer == NULL)
{
proto->debugLogA("CToxProto::OnFileData: cannot find transfer by number (%d)", fileNumber);
@@ -181,7 +181,7 @@ HANDLE __cdecl CToxProto::SendFile(MCONTACT hContact, const PROTOCHAR*, PROTOCHA char *name = mir_utf8encodeW(fileName);
int fileNumber = tox_new_file_sender(tox, friendNumber, fileSize, (uint8_t*)name, (uint16_t)mir_strlen(name));
- if (fileNumber < 0)
+ if (fileNumber == TOX_ERROR)
{
debugLogA("CToxProto::SendFilesAsync: cannot send file");
return NULL;
@@ -282,7 +282,7 @@ void CToxProto::OnFileRequest(Tox *tox, int32_t friendNumber, uint8_t receive_se MCONTACT hContact = proto->GetContact(friendNumber);
if (hContact)
{
- FileTransferParam *transfer = proto->transfers->Get(fileNumber);
+ FileTransferParam *transfer = proto->transfers->Get(friendNumber, fileNumber);
if (transfer == NULL)
{
tox_file_send_control(tox, friendNumber, receive_send, fileNumber, TOX_FILECONTROL_KILL, NULL, 0);
|