diff options
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/VKontakte/src/misc.cpp | 2 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_proto.cpp | 1 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_queue.cpp | 4 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_thread.cpp | 10 |
4 files changed, 9 insertions, 8 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index 75e23daac8..5b417a1971 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -99,7 +99,7 @@ bool CVkProto::CheckJsonResult(AsyncHttpRequest *pReq, NETLIBHTTPREQUEST *reply, return true;
int iErrorCode = json_as_int(pErrorCode);
-
+ debugLogA("CVkProto::CheckJsonResult %d", iErrorCode);
switch (iErrorCode){
case VKERR_AUTHORIZATION_FAILED:
ConnectionFailed(LOGINERR_WRONGPASSWORD);
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index ab93108d33..3d59c48847 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -406,6 +406,7 @@ int CVkProto::SetStatus(int iNewStatus) if (iNewStatus == ID_STATUS_OFFLINE) {
if ( IsOnline()) {
SetServerStatus(ID_STATUS_OFFLINE);
+ debugLogA("CVkProto::SetStatus ShutdownSession");
ShutdownSession();
}
diff --git a/protocols/VKontakte/src/vk_queue.cpp b/protocols/VKontakte/src/vk_queue.cpp index 8669646faa..4cb24e90d7 100644 --- a/protocols/VKontakte/src/vk_queue.cpp +++ b/protocols/VKontakte/src/vk_queue.cpp @@ -60,8 +60,10 @@ LBL_Restart: else if (pReq->bIsMainConn) {
if (m_iStatus >= ID_STATUS_CONNECTING && m_iStatus < ID_STATUS_CONNECTING + MAX_CONNECT_RETRIES)
ConnectionFailed(LOGINERR_NONETWORK);
- else
+ else {
+ debugLogA("CVkProto::ExecuteRequest ShutdownSession");
ShutdownSession();
+ }
}
delete pReq;
}
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index ffb9e438a7..cd8a02e0b3 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -36,7 +36,7 @@ void CVkProto::ConnectionFailed(int iReason) delSetting("AccessToken");
ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, iReason);
-
+ debugLogA("CVkProto::ConnectionFailed ShutdownSession");
ShutdownSession();
}
@@ -92,6 +92,7 @@ void CVkProto::OnLoggedOut() void CVkProto::SetServerStatus(int iNewStatus)
{
+ debugLogA("CVkProto::SetServerStatus %d %d", iNewStatus, m_iStatus);
if (!IsOnline() || iNewStatus < ID_STATUS_OFFLINE)
return;
@@ -1106,11 +1107,8 @@ int CVkProto::PollServer() NETLIBHTTPREQUEST *reply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)m_hNetlibUser, (LPARAM)&req);
if (reply == NULL) {
- debugLogA("CVkProto::PollServer is dead");
- m_pollingConn = NULL;
- int oldStatus = m_iStatus;
- m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE;
- ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)oldStatus, m_iStatus);
+ debugLogA("CVkProto::PollServer is dead");
+ ShutdownSession();
return 0;
}
|