diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2015-09-21 19:06:14 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2015-09-21 19:06:14 +0000 |
commit | 06ca08ab518ba90cc82db8cc9ac27b5a25340510 (patch) | |
tree | fb53c39091f9106431605da5af92fab710b74242 /protocols/WhatsApp/src/WhatsAPI++/WALogin.cpp | |
parent | a8af09a3f64f5cb1b7417977ed8265b5a97e4107 (diff) |
WhatsApp:
- Request password with Voice (patch by Cassio)
- minor fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@15418 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp/src/WhatsAPI++/WALogin.cpp')
-rw-r--r-- | protocols/WhatsApp/src/WhatsAPI++/WALogin.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/protocols/WhatsApp/src/WhatsAPI++/WALogin.cpp b/protocols/WhatsApp/src/WhatsAPI++/WALogin.cpp index 5184dab86e..efcb9551fb 100644 --- a/protocols/WhatsApp/src/WhatsAPI++/WALogin.cpp +++ b/protocols/WhatsApp/src/WhatsAPI++/WALogin.cpp @@ -108,9 +108,8 @@ std::vector<unsigned char> WALogin::readFeaturesUntilChallengeOrSuccess() if (ProtocolTreeNode::tagEquals(root, "stream:features")) {
m_pConnection->supports_receipt_acks = root->getChild("receipt_acks") != NULL;
delete root;
- continue;
}
- if (ProtocolTreeNode::tagEquals(root, "challenge")) {
+ else if (ProtocolTreeNode::tagEquals(root, "challenge")) {
std::vector<unsigned char> challengedata(root->data->begin(), root->data->end());
delete root;
this->sendResponse(challengedata);
@@ -119,12 +118,14 @@ std::vector<unsigned char> WALogin::readFeaturesUntilChallengeOrSuccess() m_pConnection->logData("Read success");
return std::vector<unsigned char>(data.begin(), data.end());
}
- if (ProtocolTreeNode::tagEquals(root, "success")) {
+ else if (ProtocolTreeNode::tagEquals(root, "success")) {
std::vector<unsigned char> ret(root->data->begin(), root->data->end());
this->parseSuccessNode(root);
delete root;
return ret;
}
+ else
+ delete root;
}
throw WAException("fell out of loop in readFeaturesAndChallenge", WAException::CORRUPT_STREAM_EX, 0);
}
|