summaryrefslogtreecommitdiff
path: root/protocols/WhatsAppWeb/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-10-01 16:38:49 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-10-01 16:38:49 +0300
commitdbb1f345ffde5dd13046fbfc5b2fa7643029a5c8 (patch)
tree7572fa6a873f1a36f85472911bbe2ce606fd1f6c /protocols/WhatsAppWeb/src
parent5eb98b178e5ac243402ffaa67c47619a5a9c1b1d (diff)
unneeded code removed
Diffstat (limited to 'protocols/WhatsAppWeb/src')
-rw-r--r--protocols/WhatsAppWeb/src/proto.h1
-rw-r--r--protocols/WhatsAppWeb/src/server.cpp24
2 files changed, 6 insertions, 19 deletions
diff --git a/protocols/WhatsAppWeb/src/proto.h b/protocols/WhatsAppWeb/src/proto.h
index 80ce03dba7..72ac5bede9 100644
--- a/protocols/WhatsAppWeb/src/proto.h
+++ b/protocols/WhatsAppWeb/src/proto.h
@@ -213,7 +213,6 @@ class WhatsAppProto : public PROTO<WhatsAppProto>
// binary packets
void ProcessBinaryPacket(const void *pData, size_t cbLen);
- void ProcessBinaryNode(const WANode &node);
/// Avatars ////////////////////////////////////////////////////////////////////////////
CMStringW GetAvatarFileName(MCONTACT hContact);
diff --git a/protocols/WhatsAppWeb/src/server.cpp b/protocols/WhatsAppWeb/src/server.cpp
index 7be1f40713..3dedd162fb 100644
--- a/protocols/WhatsAppWeb/src/server.cpp
+++ b/protocols/WhatsAppWeb/src/server.cpp
@@ -205,7 +205,12 @@ void WhatsAppProto::ProcessBinaryPacket(const void *pData, size_t cbDataLen)
pNode->print(szText);
debugLogA("Got binary node:\n%s", szText.c_str());
- ProcessBinaryNode(*pNode);
+ auto pHandler = FindPersistentHandler(*pNode);
+ if (pHandler)
+ (this->*pHandler)(*pNode);
+ else
+ debugLogA("cannot handle incoming message");
+
delete pNode;
}
else {
@@ -220,23 +225,6 @@ void WhatsAppProto::ProcessBinaryPacket(const void *pData, size_t cbDataLen)
}
}
-void WhatsAppProto::ProcessBinaryNode(const WANode &node)
-{
- if (m_arPacketQueue.getCount()) {
- WARequest req = m_arPacketQueue[0];
- m_arPacketQueue.remove(0);
-
- (this->*req.pHandler)(node);
- return;
- }
-
- auto pHandler = FindPersistentHandler(node);
- if (pHandler)
- (this->*pHandler)(node);
- else
- debugLogA("cannot handle incoming message");
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
void WhatsAppProto::OnLoggedIn()