From 928158d25b533037df6ba4a1b1daedeefb05bbbb Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Sat, 4 Oct 2014 01:14:11 +0000 Subject: Tox: - tox id is key again - reworked tox profile logic git-svn-id: http://svn.miranda-ng.org/main/trunk@10679 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/src/tox_account.cpp | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'protocols/Tox/src/tox_account.cpp') diff --git a/protocols/Tox/src/tox_account.cpp b/protocols/Tox/src/tox_account.cpp index 6a40a14526..a733d5f480 100644 --- a/protocols/Tox/src/tox_account.cpp +++ b/protocols/Tox/src/tox_account.cpp @@ -22,17 +22,12 @@ int CToxProto::OnAccountLoaded(WPARAM, LPARAM) void CToxProto::InitToxCore() { std::tstring profilePath = GetToxProfilePath(); - if (!IsFileExists(profilePath)) - { - return; - } - hProfile = CreateFile( profilePath.c_str(), GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, - OPEN_EXISTING, + OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); @@ -49,7 +44,7 @@ void CToxProto::InitToxCore() { if (nlus.proxyType == PROXYTYPE_SOCKS4 || nlus.proxyType == PROXYTYPE_SOCKS5) { - debugLogA("CToxProto::InitToxCore: Setting socks user proxy config"); + debugLogA("CToxProto::InitToxCore: setting socks user proxy config"); options.proxy_enabled = 1; strcpy(&options.proxy_address[0], nlus.szProxyServer); options.proxy_port = nlus.wProxyPort; @@ -97,12 +92,6 @@ void CToxProto::InitToxCore() void CToxProto::UninitToxCore() { - std::tstring profilePath = GetToxProfilePath(); - if (!IsFileExists(profilePath)) - { - return; - } - SaveToxProfile(); tox_kill(tox); CloseHandle(hProfile); -- cgit v1.2.3