summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'protocols')
-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()