summaryrefslogtreecommitdiff
path: root/protocols/Facebook
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-02-20 21:23:22 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-02-20 21:23:22 +0300
commitdd6ac172c4f814fa4b5ace6caca80d00d7e01ac8 (patch)
tree805abd69e64f8e1f268e6415689de8742cac2215 /protocols/Facebook
parent79d99837e0fefa32d695dba7e2a13b8a42f39da2 (diff)
bunch of useless threads replaced with a call of ProtoBroadcastAsync
Diffstat (limited to 'protocols/Facebook')
-rw-r--r--protocols/Facebook/src/proto.cpp8
-rw-r--r--protocols/Facebook/src/proto.h1
2 files changed, 1 insertions, 8 deletions
diff --git a/protocols/Facebook/src/proto.cpp b/protocols/Facebook/src/proto.cpp
index c59fca360b..cc3bcd875b 100644
--- a/protocols/Facebook/src/proto.cpp
+++ b/protocols/Facebook/src/proto.cpp
@@ -175,16 +175,10 @@ INT_PTR FacebookProto::GetCaps(int type, MCONTACT)
/////////////////////////////////////////////////////////////////////////////////////////
-void __cdecl FacebookProto::SendMessageAckThread(void *param)
-{
- Sleep(100);
- ProtoBroadcastAck((UINT_PTR)param, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE)1, (LPARAM)TranslateT("Protocol is offline or user isn't authorized yet"));
-}
-
int FacebookProto::SendMsg(MCONTACT hContact, int, const char *pszSrc)
{
if (!m_bOnline) {
- ForkThread(&FacebookProto::SendMessageAckThread, (void *)hContact);
+ ProtoBroadcastAsync(hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE)1, (LPARAM)TranslateT("Protocol is offline or user isn't authorized yet"));
return 1;
}
diff --git a/protocols/Facebook/src/proto.h b/protocols/Facebook/src/proto.h
index bd3eca0938..6bf94d6060 100644
--- a/protocols/Facebook/src/proto.h
+++ b/protocols/Facebook/src/proto.h
@@ -475,7 +475,6 @@ class FacebookProto : public PROTO<FacebookProto>
FacebookUser* AddContact(const CMStringW &wszId, bool bTemp = true);
- void __cdecl SendMessageAckThread(void *);
void __cdecl ServerThread(void *);
public: