summaryrefslogtreecommitdiff
path: root/protocols/MRA/src/Mra_proto.cpp
diff options
context:
space:
mode:
authorRozhuk Ivan <rozhuk.im@gmail.com>2014-03-05 16:31:51 +0000
committerRozhuk Ivan <rozhuk.im@gmail.com>2014-03-05 16:31:51 +0000
commit39c40da99dd0f8fad5832f08f5d57247ee7ef0ae (patch)
treeda30149ff5bce5bd52fe67d027e66692c3143652 /protocols/MRA/src/Mra_proto.cpp
parent046a82ec1d9982a0beb8d19b6f31c279eeb02b50 (diff)
MRA: fix SetStatus() then no password is set.
git-svn-id: http://svn.miranda-ng.org/main/trunk@8413 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MRA/src/Mra_proto.cpp')
-rw-r--r--protocols/MRA/src/Mra_proto.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/protocols/MRA/src/Mra_proto.cpp b/protocols/MRA/src/Mra_proto.cpp
index 4191017bd8..4fdcebcf40 100644
--- a/protocols/MRA/src/Mra_proto.cpp
+++ b/protocols/MRA/src/Mra_proto.cpp
@@ -8,10 +8,6 @@ DWORD CMraProto::StartConnect()
if (!g_dwGlobalPluginRunning)
return ERROR_OPERATION_ABORTED;
- // поток ещё/уже не работал, поставили статус что работает и запускаем
- if (InterlockedCompareExchange((volatile LONG*)&m_dwThreadWorkerRunning, TRUE, FALSE))
- return 0;
-
CMStringA szEmail;
mraGetStringA(NULL, "e-mail", szEmail);
@@ -21,10 +17,14 @@ DWORD CMraProto::StartConnect()
else if (!GetPassDB(szPass))
MraPopupShowFromAgentW(MRA_POPUP_TYPE_WARNING, 0, TranslateT("Please, setup password in options"));
else {
+ // поток ещё/уже не работал, поставили статус что работает и запускаем
+ if (InterlockedCompareExchange((volatile LONG*)&m_dwThreadWorkerRunning, TRUE, FALSE))
+ return 0;
InterlockedExchange((volatile LONG*)&m_dwThreadWorkerLastPingTime, GetTickCount());
ForkThreadEx(&CMraProto::MraThreadProc, NULL, 0);
+ return 0;
}
- return 0;
+ return ERROR_OPERATION_ABORTED;
}
void CMraProto::MraThreadProc(LPVOID lpParameter)