diff options
author | George Hazan <george.hazan@gmail.com> | 2015-03-28 13:35:02 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-03-28 13:35:02 +0000 |
commit | 1ab65d264fee46914571415551ed78cde14315a6 (patch) | |
tree | 670ff6fce506f8dd4c52f76e68aebefd0176b862 /protocols/JabberG/src/jabber_iqid.cpp | |
parent | 7bb399de4c4afa30fe016d25260a105448476374 (diff) |
- unused code removed;
- dynamic memory allocation for JabberSha1() replaced with static
git-svn-id: http://svn.miranda-ng.org/main/trunk@12535 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_iqid.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_iqid.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp index cc0f8d4bd4..d502c21daf 100644 --- a/protocols/JabberG/src/jabber_iqid.cpp +++ b/protocols/JabberG/src/jabber_iqid.cpp @@ -216,14 +216,11 @@ void CJabberProto::OnIqResultGetAuth(HXML iqNode, CJabberIqInfo*) HXML query = iq << XQUERY(_T("jabber:iq:auth"));
query << XCHILD(_T("username"), m_ThreadInfo->conn.username);
if (xmlGetChild(queryNode, "digest") != NULL && m_ThreadInfo->szStreamId) {
- char* str = mir_utf8encodeT(m_ThreadInfo->conn.password);
+ JabberShaStrBuf buf;
+ ptrA str(mir_utf8encodeT(m_ThreadInfo->conn.password));
char text[200];
mir_snprintf(text, SIZEOF(text), "%s%s", m_ThreadInfo->szStreamId, str);
- mir_free(str);
- if ((str = JabberSha1(text)) != NULL) {
- query << XCHILD(_T("digest"), _A2T(str));
- mir_free(str);
- }
+ query << XCHILD(_T("digest"), _A2T(JabberSha1(text, buf)));
}
else if (xmlGetChild(queryNode, "password") != NULL)
query << XCHILD(_T("password"), m_ThreadInfo->conn.password);
|