summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_avatars.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-05-16 17:55:46 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-05-16 17:55:46 +0000
commit8afb55f81f38daef246b9cdb82b680ef8538881d (patch)
tree7b3ae6624fd0c3e348509cebefd67bdb30cb1149 /protocols/Tox/src/tox_avatars.cpp
parent958e8345292ae34336abf0722c82ede2692e9bf4 (diff)
Tox: setting direction flag of transfer
git-svn-id: http://svn.miranda-ng.org/main/trunk@13629 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_avatars.cpp')
-rw-r--r--protocols/Tox/src/tox_avatars.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/protocols/Tox/src/tox_avatars.cpp b/protocols/Tox/src/tox_avatars.cpp
index 40854b3b83..d93f62584a 100644
--- a/protocols/Tox/src/tox_avatars.cpp
+++ b/protocols/Tox/src/tox_avatars.cpp
@@ -87,6 +87,7 @@ void CToxProto::SetToxAvatar(std::tstring path, bool checkHash)
}
AvatarTransferParam *transfer = new AvatarTransferParam(friendNumber, fileNumber, NULL, length);
+ transfer->pfts.flags |= PFTS_SENDING;
memcpy(transfer->hash, hash, TOX_HASH_LENGTH);
transfer->pfts.hContact = hContact;
transfer->hFile = _tfopen(path.c_str(), L"rb");
@@ -131,8 +132,8 @@ INT_PTR CToxProto::GetAvatarInfo(WPARAM, LPARAM lParam)
{
PROTO_AVATAR_INFORMATIONW *pai = (PROTO_AVATAR_INFORMATIONW *)lParam;
- ptrA id(getStringA(pai->hContact, TOX_SETTINGS_ID));
- if (id != NULL)
+ ptrA address(getStringA(pai->hContact, TOX_SETTINGS_ID));
+ if (address != NULL)
{
std::tstring path = GetAvatarFilePath(pai->hContact);
if (IsFileExists(path))