diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2014-10-04 01:14:11 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2014-10-04 01:14:11 +0000 |
commit | 928158d25b533037df6ba4a1b1daedeefb05bbbb (patch) | |
tree | ff6d48fffb7182bda42cbd1d057496e78bed350d /protocols/Tox/src/tox_account.cpp | |
parent | 334c3a9d18f177f1b6c71d754219f56057d315c0 (diff) |
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
Diffstat (limited to 'protocols/Tox/src/tox_account.cpp')
-rw-r--r-- | protocols/Tox/src/tox_account.cpp | 15 |
1 files changed, 2 insertions, 13 deletions
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);
|