diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-08-13 17:39:30 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-08-13 17:39:30 +0000 |
commit | ea20be4475a06afea0da33b46ec5957f7b1ced99 (patch) | |
tree | d786924ded2b5eabf501897f03f1ff7632ca2aed /protocols/Tox | |
parent | 1ea84dc56d95ceaf85c036127c5045eba0ad50ee (diff) |
Tox:
- removed toxme.se from tox.ini
- profile reading/saving with lock
git-svn-id: http://svn.miranda-ng.org/main/trunk@14942 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox')
-rw-r--r-- | protocols/Tox/docs/tox.ini | 4 | ||||
-rw-r--r-- | protocols/Tox/src/tox_contacts.cpp | 2 | ||||
-rw-r--r-- | protocols/Tox/src/tox_profile.cpp | 4 | ||||
-rw-r--r-- | protocols/Tox/src/tox_proto.h | 1 |
4 files changed, 6 insertions, 5 deletions
diff --git a/protocols/Tox/docs/tox.ini b/protocols/Tox/docs/tox.ini index 46a7b89872..f747fef078 100644 --- a/protocols/Tox/docs/tox.ini +++ b/protocols/Tox/docs/tox.ini @@ -1,8 +1,4 @@ [Dns_0]
-Domain=toxme.se
-PubKey=5D72C517DF6AEC54F1E977A6B6F25914EA4CF7277A85027CD9F5196DF17E0B13
-
-[Dns_1]
Domain=utox.org
PubKey=D3154F65D28A5B41A05D4AC7E4B39C6B1C233CC857FB365C56E8392737462A12
diff --git a/protocols/Tox/src/tox_contacts.cpp b/protocols/Tox/src/tox_contacts.cpp index 7ce9442134..f6e99a5252 100644 --- a/protocols/Tox/src/tox_contacts.cpp +++ b/protocols/Tox/src/tox_contacts.cpp @@ -184,7 +184,7 @@ INT_PTR CToxProto::OnGrantAuth(WPARAM hContact, LPARAM) if (!IsOnline())
return 0;
- ToxBinAddress pubKey = ptrA(getStringA(hContact, TOX_SETTINGS_ID));
+ ToxBinAddress pubKey(ptrA(getStringA(hContact, TOX_SETTINGS_ID)));
TOX_ERR_FRIEND_ADD error;
tox_friend_add_norequest(tox, pubKey, &error);
if (error != TOX_ERR_FRIEND_ADD_OK)
diff --git a/protocols/Tox/src/tox_profile.cpp b/protocols/Tox/src/tox_profile.cpp index 93fb9e9929..89f40d75e7 100644 --- a/protocols/Tox/src/tox_profile.cpp +++ b/protocols/Tox/src/tox_profile.cpp @@ -20,6 +20,8 @@ bool CToxProto::LoadToxProfile(Tox_Options *options) {
debugLogA(__FUNCTION__": loading tox profile");
+ mir_cslock locker(profileLock);
+
size_t size = 0;
uint8_t *data = NULL;
@@ -100,6 +102,8 @@ bool CToxProto::LoadToxProfile(Tox_Options *options) void CToxProto::SaveToxProfile()
{
+ mir_cslock locker(profileLock);
+
size_t size = tox_get_savedata_size(tox);
uint8_t *data = (uint8_t*)mir_calloc(size + TOX_PASS_ENCRYPTION_EXTRA_LENGTH);
tox_get_savedata(tox, data);
diff --git a/protocols/Tox/src/tox_proto.h b/protocols/Tox/src/tox_proto.h index 28d22f2422..36705265f2 100644 --- a/protocols/Tox/src/tox_proto.h +++ b/protocols/Tox/src/tox_proto.h @@ -73,6 +73,7 @@ private: ToxAv *toxAv;
char *password;
mir_cs toxLock;
+ mir_cs profileLock;
TCHAR *accountName;
HANDLE hNetlib, hPollingThread;
bool isTerminated, isConnected;
|