diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-05-29 21:33:17 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-05-29 21:33:17 +0000 |
commit | a66281d8453edde56145e032e8d38db91580ba08 (patch) | |
tree | efdddb6f765cf020502eed9139dab6767adb5d0b /protocols/Tox/src/tox_proto.cpp | |
parent | 6c5621e08b28ff3c3db26726aafd827d354d6934 (diff) |
Tox:
- reworked code related with address/public key
- added tox_add_tcp_relay to bootstrap
- updated tox core
- version bump
git-svn-id: http://svn.miranda-ng.org/main/trunk@13900 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_proto.cpp')
-rw-r--r-- | protocols/Tox/src/tox_proto.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/protocols/Tox/src/tox_proto.cpp b/protocols/Tox/src/tox_proto.cpp index 3891400c79..0e7d157c45 100644 --- a/protocols/Tox/src/tox_proto.cpp +++ b/protocols/Tox/src/tox_proto.cpp @@ -1,10 +1,10 @@ #include "stdafx.h"
CToxProto::CToxProto(const char* protoName, const TCHAR* userName) :
- PROTO<CToxProto>(protoName, userName),
- tox(NULL), toxAv(NULL), password(NULL),
- isTerminated(false), isConnected(false),
- hPollingThread(NULL), hOutDevice(NULL)
+PROTO<CToxProto>(protoName, userName),
+tox(NULL), toxAv(NULL), password(NULL),
+isTerminated(false), isConnected(false),
+hPollingThread(NULL), hOutDevice(NULL)
{
InitNetlib();
@@ -70,14 +70,13 @@ MCONTACT CToxProto::AddToList(int flags, PROTOSEARCHRESULT *psr) ShowNotification(TranslateT("You cannot add yourself to your contact list"), 0);
return NULL;
}
- MCONTACT hContact = GetContact((char*)address);
- if (hContact)
+ if (MCONTACT hContact = GetContact((char*)address))
{
ShowNotification(TranslateT("Contact already in your contact list"), 0, hContact);
return NULL;
}
- // set tox address as contact public key
- return AddContact(address, _T(""), flags & PALF_TEMPORARY);
+ ptrT dnsId(mir_tstrdup(psr->email));
+ return AddContact(address, dnsId, flags & PALF_TEMPORARY);
}
int CToxProto::Authorize(MEVENT hDbEvent)
|