From cadce59e5a1e8918df7ccf69581f784e58d19903 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 30 May 2019 13:51:40 +0300 Subject: ICQ-WIM: cache initialization should be implemented before running ServerThread, to avoid problems with modal MessageBox() calls --- protocols/ICQ-WIM/src/proto.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/protocols/ICQ-WIM/src/proto.cpp b/protocols/ICQ-WIM/src/proto.cpp index 0ec2d4dc7e..0833fa1696 100644 --- a/protocols/ICQ-WIM/src/proto.cpp +++ b/protocols/ICQ-WIM/src/proto.cpp @@ -84,19 +84,6 @@ CIcqProto::CIcqProto(const char* aProtoName, const wchar_t* aUserName) : nlu.szDescriptiveName.w = descr.GetBuffer(); m_hNetlibUser = Netlib_RegisterUser(&nlu); - m_hWorkerThread = ForkThreadEx(&CIcqProto::ServerThread, nullptr, nullptr); -} - -CIcqProto::~CIcqProto() -{ - ::CloseHandle(m_evRequestsQueue); -} - -//////////////////////////////////////////////////////////////////////////////////////// -// OnModulesLoadedEx - performs hook registration - -void CIcqProto::OnModulesLoaded() -{ // this was previously an old ICQ account ptrW wszUin(GetUIN(0)); if (wszUin != nullptr) { @@ -118,6 +105,19 @@ void CIcqProto::OnModulesLoaded() InitContactCache(); + m_hWorkerThread = ForkThreadEx(&CIcqProto::ServerThread, nullptr, nullptr); +} + +CIcqProto::~CIcqProto() +{ + ::CloseHandle(m_evRequestsQueue); +} + +//////////////////////////////////////////////////////////////////////////////////////// +// OnModulesLoadedEx - performs hook registration + +void CIcqProto::OnModulesLoaded() +{ GCREGISTER gcr = {}; gcr.dwFlags = GC_TYPNOTIF | GC_CHANMGR; gcr.ptszDispName = m_tszUserName; -- cgit v1.2.3