summaryrefslogtreecommitdiff
path: root/protocols/ICQ-WIM/src/proto.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-05-30 13:51:40 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-05-30 13:51:40 +0300
commitcadce59e5a1e8918df7ccf69581f784e58d19903 (patch)
treec61999f074a944dcaf134600a448f3321412e24e /protocols/ICQ-WIM/src/proto.cpp
parent4cae6446ffc3e024d7b7f0e1fd888459f7ab514e (diff)
ICQ-WIM: cache initialization should be implemented before running ServerThread, to avoid problems with modal MessageBox() calls
Diffstat (limited to 'protocols/ICQ-WIM/src/proto.cpp')
-rw-r--r--protocols/ICQ-WIM/src/proto.cpp26
1 files 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;