diff options
author | George Hazan <george.hazan@gmail.com> | 2015-01-25 22:07:28 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-01-25 22:07:28 +0000 |
commit | 97ba0b94c5da04f0d03945baa21c338c77c9dc20 (patch) | |
tree | 55d1b4c131a616b8c660128c70418df95de99b90 /protocols/WhatsApp/src/connection.cpp | |
parent | 4b9da6b7ea643ac4917440880583d507b697cf9a (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.cpp | 9 |
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;
|