summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp/src/connection.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-01-25 22:07:28 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-01-25 22:07:28 +0000
commit97ba0b94c5da04f0d03945baa21c338c77c9dc20 (patch)
tree55d1b4c131a616b8c660128c70418df95de99b90 /protocols/WhatsApp/src/connection.cpp
parent4b9da6b7ea643ac4917440880583d507b697cf9a (diff)
- correct writing of tokens, especially extended
- further code optimizations git-svn-id: http://svn.miranda-ng.org/main/trunk@11911 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp/src/connection.cpp')
-rw-r--r--protocols/WhatsApp/src/connection.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/protocols/WhatsApp/src/connection.cpp b/protocols/WhatsApp/src/connection.cpp
index 2acc8a89fa..8c1f16c456 100644
--- a/protocols/WhatsApp/src/connection.cpp
+++ b/protocols/WhatsApp/src/connection.cpp
@@ -118,13 +118,10 @@ void WhatsAppProto::stayConnectedLoop(void*)
portNumber = 5222, resource += "-5222";
this->conn = new WASocketConnection("c.whatsapp.net", portNumber);
- this->connection = new WAConnection(&this->connMutex, this, this);
-
- this->connection->domain = "s.whatsapp.net";
- this->connection->user = this->phoneNumber;
- this->connection->resource = resource;
+ this->connection = new WAConnection(this->phoneNumber, resource, &this->connMutex, this, this);
+ this->connection->init(&writerMutex, this->conn);
{
- WALogin login(connection, new BinTreeNodeReader(connection, conn), new BinTreeNodeWriter(connection, conn, &writerMutex), password);
+ WALogin login(connection, password);
std::vector<unsigned char>* nextChallenge = login.login(*this->challenge);
delete this->challenge;