diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2016-04-27 12:44:53 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2016-04-27 12:44:53 +0000 |
commit | 6524ac4e637dba2de42df5ca6eac4a9a5501a4d2 (patch) | |
tree | 7dcf19e3e117b2cd5479615f12425518cb7fe3d8 /protocols/Tox/src/tox_avatars.cpp | |
parent | 497a5b44f0784b488ede3e450cdb2b281c7a86d8 (diff) |
Tox:
- attempt to fix avatar hash
- some changes with toxThread
git-svn-id: http://svn.miranda-ng.org/main/trunk@16773 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_avatars.cpp')
-rw-r--r-- | protocols/Tox/src/tox_avatars.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/protocols/Tox/src/tox_avatars.cpp b/protocols/Tox/src/tox_avatars.cpp index efa04e6861..9b1e4a36dd 100644 --- a/protocols/Tox/src/tox_avatars.cpp +++ b/protocols/Tox/src/tox_avatars.cpp @@ -53,7 +53,7 @@ void CToxProto::SetToxAvatar(const TCHAR* path) DBVARIANT dbv;
uint8_t hash[TOX_HASH_LENGTH];
- tox_hash(hash, data, TOX_HASH_LENGTH);
+ tox_hash(hash, data, length);
if (!db_get(NULL, m_szModuleName, TOX_SETTINGS_AVATAR_HASH, &dbv))
{
if (memcmp(hash, dbv.pbVal, TOX_HASH_LENGTH) == 0)
@@ -84,7 +84,7 @@ void CToxProto::SetToxAvatar(const TCHAR* path) }
TOX_ERR_FILE_SEND error;
- uint32_t fileNumber = tox_file_send(toxThread->tox, friendNumber, TOX_FILE_KIND_AVATAR, length, hash, NULL, 0, &error);
+ uint32_t fileNumber = tox_file_send(toxThread->Tox(), friendNumber, TOX_FILE_KIND_AVATAR, length, hash, NULL, 0, &error);
if (error != TOX_ERR_FILE_SEND_OK)
{
mir_free(data);
@@ -186,7 +186,7 @@ INT_PTR CToxProto::SetMyAvatar(WPARAM, LPARAM lParam) continue;
TOX_ERR_FILE_SEND error;
- tox_file_send(toxThread->tox, friendNumber, TOX_FILE_KIND_AVATAR, 0, NULL, NULL, 0, &error);
+ tox_file_send(toxThread->Tox(), friendNumber, TOX_FILE_KIND_AVATAR, 0, NULL, NULL, 0, &error);
if (error != TOX_ERR_FILE_SEND_OK)
{
logger->Log(__FUNCTION__": failed to unset avatar (%d)", error);
|