diff options
-rw-r--r-- | protocols/WhatsAppWeb/src/proto.h | 2 | ||||
-rw-r--r-- | protocols/WhatsAppWeb/src/server.cpp | 7 |
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 |