diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-05-15 21:15:52 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-05-15 21:15:52 +0000 |
commit | ec16b101e315312ce413f4bb9f7a5de5e993fcaf (patch) | |
tree | bbb44e561e22af07dec8297d6b010d828f03148b /protocols/Tox/src/tox_transfer.cpp | |
parent | c08a8d0b413a616b721eeb37e4a2e9287c053410 (diff) |
Tox:
- temporary disabled multimedia abilities
- fixed file sending
- fixed avatar changing
- updated tox core
- version bumb
git-svn-id: http://svn.miranda-ng.org/main/trunk@13610 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_transfer.cpp')
-rw-r--r-- | protocols/Tox/src/tox_transfer.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/protocols/Tox/src/tox_transfer.cpp b/protocols/Tox/src/tox_transfer.cpp index 90d61a4d87..1c56c24081 100644 --- a/protocols/Tox/src/tox_transfer.cpp +++ b/protocols/Tox/src/tox_transfer.cpp @@ -14,9 +14,9 @@ void CToxProto::OnFriendFile(Tox*, uint32_t friendNumber, uint32_t fileNumber, u {
case TOX_FILE_KIND_AVATAR:
{
- ptrT id(proto->getTStringA(hContact, TOX_SETTINGS_ID));
+ ptrT address(proto->getTStringA(hContact, TOX_SETTINGS_ID));
TCHAR avatarName[MAX_PATH];
- mir_sntprintf(avatarName, MAX_PATH, _T("%s.png"), id);
+ mir_sntprintf(avatarName, MAX_PATH, _T("%s.png"), address);
AvatarTransferParam *transfer = new AvatarTransferParam(friendNumber, fileNumber, avatarName, fileSize);
transfer->pfts.hContact = hContact;
@@ -246,9 +246,7 @@ void CToxProto::OnFileSendData(Tox*, uint32_t friendNumber, uint32_t fileNumber, proto->debugLogA(__FUNCTION__": finised the transfer of file (%d)", fileNumber);
bool isFileFullyTransfered = transfer->pfts.currentFileProgress == transfer->pfts.currentFileSize;
if (!isFileFullyTransfered)
- {
- proto->debugLogA(__FUNCTION__": file (%d) is transferred not completely", fileNumber);
- }
+ proto->debugLogA(__FUNCTION__": file (%d) is not completely transferred", fileNumber);
proto->ProtoBroadcastAck(transfer->pfts.hContact, ACKTYPE_FILE, isFileFullyTransfered ? ACKRESULT_SUCCESS : ACKRESULT_FAILED, (HANDLE)transfer, 0);
proto->transfers.Remove(transfer);
return;
@@ -278,7 +276,7 @@ void CToxProto::OnFileSendData(Tox*, uint32_t friendNumber, uint32_t fileNumber, return;
}
- transfer->pfts.totalProgress = transfer->pfts.currentFileProgress = length;
+ transfer->pfts.totalProgress = transfer->pfts.currentFileProgress += length;
mir_free(data);
}
|