summaryrefslogtreecommitdiff
path: root/protocols/WhatsAppWeb/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-10-09 18:03:13 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-10-09 18:03:13 +0300
commit9d9b779e3f6da9336c99ca9e746709d7a5092128 (patch)
treeb1f83e9320fdb09c39aa2a2f4f7721fc58a49b1a /protocols/WhatsAppWeb/src
parent569ee04e7e8e04ca5a3ac71d4f287b872e3b03cf (diff)
.
Diffstat (limited to 'protocols/WhatsAppWeb/src')
-rw-r--r--protocols/WhatsAppWeb/src/proto.h2
-rw-r--r--protocols/WhatsAppWeb/src/server.cpp7
2 files changed, 5 insertions, 4 deletions
diff --git a/protocols/WhatsAppWeb/src/proto.h b/protocols/WhatsAppWeb/src/proto.h
index 932aa408e0..06f8c7609f 100644
--- a/protocols/WhatsAppWeb/src/proto.h
+++ b/protocols/WhatsAppWeb/src/proto.h
@@ -121,7 +121,7 @@ public:
// Contacts handling ///////////////////////////////////////////////////////////////////
- void RequestFriendship(MCONTACT hContact);
+ void RequestFriendship(MCONTACT hContact);
};
struct CMPlugin : public ACCPROTOPLUGIN<WhatsAppProto>
diff --git a/protocols/WhatsAppWeb/src/server.cpp b/protocols/WhatsAppWeb/src/server.cpp
index c79e4fe1a7..3a682e00fa 100644
--- a/protocols/WhatsAppWeb/src/server.cpp
+++ b/protocols/WhatsAppWeb/src/server.cpp
@@ -323,9 +323,7 @@ bool WhatsAppProto::ServerThreadWorker()
size_t prevSize = 0;
while (true) {
switch (hdr.opCode) {
- case 0: // text packet
- case 1: // binary packet
- case 2: // continuation
+ case 1: // json packet
if (hdr.bIsFinal) {
// process a packet here
CMStringA szJson(netbuf.data() + hdr.headerSize, (int)hdr.payloadSize);
@@ -351,6 +349,9 @@ bool WhatsAppProto::ServerThreadWorker()
}
break;
+ case 2: // binary packet
+ break;
+
case 8: // close
debugLogA("server required to exit");
bExit = true; // simply reconnect, don't exit