summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_profile.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-08-13 17:39:30 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-08-13 17:39:30 +0000
commitea20be4475a06afea0da33b46ec5957f7b1ced99 (patch)
treed786924ded2b5eabf501897f03f1ff7632ca2aed /protocols/Tox/src/tox_profile.cpp
parent1ea84dc56d95ceaf85c036127c5045eba0ad50ee (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/src/tox_profile.cpp')
-rw-r--r--protocols/Tox/src/tox_profile.cpp4
1 files changed, 4 insertions, 0 deletions
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);