summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/ICQ-WIM/src/poll.cpp7
-rw-r--r--protocols/ICQ-WIM/src/proto.h2
-rw-r--r--protocols/ICQ-WIM/src/server.cpp3
3 files changed, 4 insertions, 8 deletions
diff --git a/protocols/ICQ-WIM/src/poll.cpp b/protocols/ICQ-WIM/src/poll.cpp
index cb7ca2fe59..d5018a3d53 100644
--- a/protocols/ICQ-WIM/src/poll.cpp
+++ b/protocols/ICQ-WIM/src/poll.cpp
@@ -314,7 +314,7 @@ void CIcqProto::ProcessPresence(const JSONNode &ev)
}
}
-void CIcqProto::ProcessSessionEnd(const JSONNode&)
+void CIcqProto::ProcessSessionEnd(const JSONNode &/*ev*/)
{
m_szRToken.Empty();
m_iRClientId = 0;
@@ -332,7 +332,7 @@ void CIcqProto::ProcessTyping(const JSONNode &ev)
if (pCache) {
if (wszStatus == "typing")
CallService(MS_PROTO_CONTACTISTYPING, pCache->m_hContact, 60);
- else
+ else
CallService(MS_PROTO_CONTACTISTYPING, pCache->m_hContact, PROTOTYPE_CONTACTTYPING_OFF);
}
}
@@ -367,7 +367,7 @@ void __cdecl CIcqProto::PollThread(void*)
auto *pReq = new AsyncHttpRequest(CONN_FETCH, REQUEST_GET, szUrl, &CIcqProto::OnFetchEvents);
if (!m_bFirstBos)
pReq->timeout = 62000;
-
+
if (!ExecuteRequest(pReq)) {
ShutdownSession();
break;
@@ -377,5 +377,4 @@ void __cdecl CIcqProto::PollThread(void*)
}
debugLogA("Polling thread ended");
- m_hPollThread = nullptr;
}
diff --git a/protocols/ICQ-WIM/src/proto.h b/protocols/ICQ-WIM/src/proto.h
index 47e8cba068..f6c33a8fd0 100644
--- a/protocols/ICQ-WIM/src/proto.h
+++ b/protocols/ICQ-WIM/src/proto.h
@@ -372,8 +372,6 @@ class CIcqProto : public PROTO<CIcqProto>
HANDLE m_hWorkerThread;
void __cdecl ServerThread(void*);
-
- HANDLE m_hPollThread;
void __cdecl PollThread(void*);
////////////////////////////////////////////////////////////////////////////////////////
diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp
index 1092dba581..35d28d9f90 100644
--- a/protocols/ICQ-WIM/src/server.cpp
+++ b/protocols/ICQ-WIM/src/server.cpp
@@ -1000,8 +1000,7 @@ void CIcqProto::OnStartSession(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest *)
for (auto &it : data["events"])
ProcessEvent(it);
- if (m_hPollThread == nullptr)
- m_hPollThread = ForkThreadEx(&CIcqProto::PollThread, 0, 0);
+ ForkThread(&CIcqProto::PollThread);
}
void CIcqProto::OnReceiveAvatar(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest *pReq)