From fff1ac3f077a527d14febb31be1160c329df3810 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Sun, 21 Sep 2014 15:41:10 +0000 Subject: Tox: fixed auth request git-svn-id: http://svn.miranda-ng.org/main/trunk@10544 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/src/tox_proto.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'protocols') 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 pubKey = HexStringToData(id); + std::string address = getStringA(hContact, TOX_SETTINGS_ID); + std::vector 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"); -- cgit v1.2.3