diff options
author | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-03-05 22:24:53 +0000 |
---|---|---|
committer | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-03-05 22:24:53 +0000 |
commit | d5adcdbd5c1fda81f1be805dadc8021837ed706d (patch) | |
tree | e10c78a3f6cdd61a462d35e166e90f2d6495749d /protocols/MRA/src/Mra_proto.cpp | |
parent | 1b4b315a7d30af10f17719aadae1ba3b62c56b11 (diff) |
+ Add: "Automatically authorization on mail.ru web services" option, enabled by default
+ Restore: mail.ru web services for non MRA contacts with email
+ Restore: hidden option "HideMenuItemsForNonMRAContacts", disabled by default
* Fix: show mail.ru web services then proto is offline
* Code clean up few small fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@8422 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MRA/src/Mra_proto.cpp')
-rw-r--r-- | protocols/MRA/src/Mra_proto.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/protocols/MRA/src/Mra_proto.cpp b/protocols/MRA/src/Mra_proto.cpp index 321c314025..9fcea8eeb0 100644 --- a/protocols/MRA/src/Mra_proto.cpp +++ b/protocols/MRA/src/Mra_proto.cpp @@ -22,9 +22,9 @@ DWORD CMraProto::StartConnect() MraPopupShowFromAgentW(MRA_POPUP_TYPE_WARNING, 0, TranslateT("Please, setup password in options"));
else {
InterlockedExchange((volatile LONG*)&m_dwThreadWorkerLastPingTime, GetTickCount());
- if (INVALID_HANDLE_VALUE == ForkThreadEx(&CMraProto::MraThreadProc, NULL, 0)) /* Thread create fail. */
- MraPopupShowFromAgentW(MRA_POPUP_TYPE_ERROR, 0, TranslateT("Thread create fail"));
- return 0;
+ if (INVALID_HANDLE_VALUE != ForkThreadEx(&CMraProto::MraThreadProc, NULL, 0))
+ return 0; /* OK. */
+ MraPopupShowFromAgentW(MRA_POPUP_TYPE_ERROR, 0, TranslateT("Thread create fail"));
}
InterlockedExchange((volatile LONG*)&m_dwThreadWorkerRunning, FALSE);
return ERROR_OPERATION_ABORTED;
@@ -589,13 +589,15 @@ bool CMraProto::CmdPopSession(BinBuffer &buf) DWORD dwTemp = buf.getDword();
if (dwTemp) {
CMStringA szString; buf >> szString;
- MraMPopSessionQueueSetNewMPopKey(hMPopSessionQueue, szString);
- MraMPopSessionQueueStart(hMPopSessionQueue);
- }
- else { //error
- MraPopupShowFromAgentW(MRA_POPUP_TYPE_WARNING, 0, TranslateT("Server error: can't get MPOP key for web authorize"));
- MraMPopSessionQueueFlush(hMPopSessionQueue);
+ if (NO_ERROR == MraMPopSessionQueueSetNewMPopKey(hMPopSessionQueue, szString)) {
+ MraMPopSessionQueueStart(hMPopSessionQueue);
+ return true;
+ }
}
+ //error
+ MraPopupShowFromAgentW(MRA_POPUP_TYPE_WARNING, 0, TranslateT("Server error: can't get MPOP key for web authorize"));
+ MraMPopSessionQueueFlush(hMPopSessionQueue);
+
return true;
}
|