diff options
author | George Hazan <george.hazan@gmail.com> | 2013-12-05 21:09:54 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-12-05 21:09:54 +0000 |
commit | 3f4bfef9370e7ec778e501f4608d3c4fe0b3b255 (patch) | |
tree | bd9909d80ccfc52654dc201d965df35d16bfb846 /plugins/Db3x_mmap/src/ui.cpp | |
parent | c694daeb12c2ee641e539c89e721af27d6526948 (diff) |
fix for setting password online
git-svn-id: http://svn.miranda-ng.org/main/trunk@7060 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Db3x_mmap/src/ui.cpp')
-rw-r--r-- | plugins/Db3x_mmap/src/ui.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/plugins/Db3x_mmap/src/ui.cpp b/plugins/Db3x_mmap/src/ui.cpp index 1296808fcf..fa22d1008b 100644 --- a/plugins/Db3x_mmap/src/ui.cpp +++ b/plugins/Db3x_mmap/src/ui.cpp @@ -127,6 +127,7 @@ bool CDb3Mmap::EnterPassword(const BYTE *pKey, const size_t keyLen) m_crypto->setPassword(ptrA(mir_utf8encodeT(param.newPass)));
if (m_crypto->setKey(pKey, keyLen)) {
+ m_bUsesPassword = true;
SecureZeroMemory(¶m, sizeof(param));
return true;
}
@@ -233,10 +234,7 @@ static INT_PTR ChangePassword(void* obj, LPARAM, LPARAM) CDb3Mmap *db = (CDb3Mmap*)obj;
DlgChangePassParam param = { db };
if (IDOK == DialogBoxParam(g_hInst, MAKEINTRESOURCE(db->usesPassword() ? IDD_CHANGEPASS : IDD_NEWPASS), 0, sttChangePassword, (LPARAM)¶m)) {
- if (param.newPass[0])
- db->m_crypto->setPassword(ptrA(mir_utf8encodeT(param.newPass)));
- else
- db->m_crypto->setPassword(NULL);
+ db->SetPassword(param.newPass);
db->StoreKey();
}
|