From ec16b101e315312ce413f4bb9f7a5de5e993fcaf Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Fri, 15 May 2015 21:15:52 +0000 Subject: 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 --- protocols/Tox/src/tox_transfer.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 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 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); } -- cgit v1.2.3