summaryrefslogtreecommitdiff
path: root/protocols/Tox/src
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2014-09-21 15:41:10 +0000
committerAlexander Lantsev <aunsane@gmail.com>2014-09-21 15:41:10 +0000
commitfff1ac3f077a527d14febb31be1160c329df3810 (patch)
treebc45fcbb4a5e2ab7c25a02eeb098f579fa3c06c8 /protocols/Tox/src
parent7dc6676dd9b8ba531c6e896e7b54905d5c26c974 (diff)
Tox: fixed auth request
git-svn-id: http://svn.miranda-ng.org/main/trunk@10544 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src')
-rw-r--r--protocols/Tox/src/tox_proto.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/protocols/Tox/src/tox_proto.cpp b/protocols/Tox/src/tox_proto.cpp
index 081192322d..7106d88af6 100644
--- a/protocols/Tox/src/tox_proto.cpp
+++ b/protocols/Tox/src/tox_proto.cpp
@@ -119,15 +119,15 @@ int __cdecl CToxProto::AuthRequest(MCONTACT hContact, const PROTOCHAR* szMessage
{
ptrA reason(mir_utf8encodeW(szMessage));
- std::string id = getStringA(hContact, TOX_SETTINGS_ID);
- std::vector<uint8_t> pubKey = HexStringToData(id);
+ std::string address = getStringA(hContact, TOX_SETTINGS_ID);
+ std::vector<uint8_t> pubKey = HexStringToData(address);
int32_t number = tox_add_friend(tox, pubKey.data(), (uint8_t*)(char*)reason, (uint16_t)strlen(reason));
if (number > TOX_ERROR)
{
SaveToxData();
// change tox address in contact id by tox id
- id.resize(TOX_CLIENT_ID_SIZE);
+ std::string id = ToxAddressToId(address);
setString(hContact, TOX_SETTINGS_ID, id.c_str());
db_unset(hContact, "CList", "NotOnList");