diff options
author | George Hazan <george.hazan@gmail.com> | 2013-06-24 12:29:37 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-06-24 12:29:37 +0000 |
commit | dc2a9c66749ef4c8c6a748218bf80b80d0bbe0d6 (patch) | |
tree | 4d854eda13f45812127bb1773730355c26dff417 /protocols/WhatsApp/src/connection.cpp | |
parent | 852df1e2fd8a0e220065b0eb1443b3e834101531 (diff) |
- custom base64 encoder removed;
- warning fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@5117 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp/src/connection.cpp')
-rw-r--r-- | protocols/WhatsApp/src/connection.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/protocols/WhatsApp/src/connection.cpp b/protocols/WhatsApp/src/connection.cpp index 76c2808d12..2b87830046 100644 --- a/protocols/WhatsApp/src/connection.cpp +++ b/protocols/WhatsApp/src/connection.cpp @@ -143,6 +143,7 @@ void WhatsAppProto::stayConnectedLoop(void*) CODE_BLOCK_TRY
+ std::string password = ptrA((char*)mir_base64_decode(pass.c_str(),0));
BYTE UseSSL = db_get_b(NULL, this->ModuleName(), WHATSAPP_KEY_SSL, 0);
if (UseSSL) {
this->conn = new WASocketConnection("c.whatsapp.net", 443);
@@ -150,14 +151,14 @@ void WhatsAppProto::stayConnectedLoop(void*) connection = new WAConnection(&this->connMutex, this, this);
login = new WALogin(connection, new BinTreeNodeReader(connection, conn, WAConnection::dictionary, WAConnection::DICTIONARY_LEN),
new BinTreeNodeWriter(connection, conn, WAConnection::dictionary, WAConnection::DICTIONARY_LEN, &writerMutex),
- "s.whatsapp.net", this->phoneNumber, std::string(ACCOUNT_RESOURCE) +"-443", base64_decode(pass), nick);
+ "s.whatsapp.net", this->phoneNumber, std::string(ACCOUNT_RESOURCE) +"-443", password, nick);
} else {
this->conn = new WASocketConnection("c.whatsapp.net", 5222);
connection = new WAConnection(&this->connMutex, this, this);
login = new WALogin(connection, new BinTreeNodeReader(connection, conn, WAConnection::dictionary, WAConnection::DICTIONARY_LEN),
new BinTreeNodeWriter(connection, conn, WAConnection::dictionary, WAConnection::DICTIONARY_LEN, &writerMutex),
- "s.whatsapp.net", this->phoneNumber, std::string(ACCOUNT_RESOURCE) +"-5222", base64_decode(pass), nick);
+ "s.whatsapp.net", this->phoneNumber, std::string(ACCOUNT_RESOURCE) +"-5222", password, nick);
}
std::vector<unsigned char>* nextChallenge = login->login(*this->challenge);
|