From 300935cc22700e2ff3607fb3d0e06ac496ad6fcd Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 5 Mar 2019 14:31:44 +0300 Subject: fixes #1877 (ICQ-WIM doesn't close session correctly in some cases) --- protocols/ICQ-WIM/src/poll.cpp | 2 ++ protocols/ICQ-WIM/src/proto.cpp | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'protocols/ICQ-WIM/src') diff --git a/protocols/ICQ-WIM/src/poll.cpp b/protocols/ICQ-WIM/src/poll.cpp index 9b64bbd99b..d04d7184bb 100644 --- a/protocols/ICQ-WIM/src/poll.cpp +++ b/protocols/ICQ-WIM/src/poll.cpp @@ -114,6 +114,8 @@ void CIcqProto::ProcessEvent(const JSONNode &ev) ProcessPermissions(pData); else if (szType == L"presence") ProcessPresence(pData); + else if (szType == L"sessionEnded") + ShutdownSession(); else if (szType == L"typing") ProcessTyping(pData); } diff --git a/protocols/ICQ-WIM/src/proto.cpp b/protocols/ICQ-WIM/src/proto.cpp index 1d01af5dc4..1e6057af82 100644 --- a/protocols/ICQ-WIM/src/proto.cpp +++ b/protocols/ICQ-WIM/src/proto.cpp @@ -451,10 +451,9 @@ int CIcqProto::SetStatus(int iNewStatus) // go offline if (iNewStatus == ID_STATUS_OFFLINE) { - if (m_bOnline) { + if (m_bOnline) SetServerStatus(ID_STATUS_OFFLINE); - ShutdownSession(); - } + m_iStatus = m_iDesiredStatus; setAllContactStatuses(ID_STATUS_OFFLINE, false); -- cgit v1.2.3