diff options
author | Alexander Gluzsky <sss123next@list.ru> | 2012-12-23 16:17:07 +0000 |
---|---|---|
committer | Alexander Gluzsky <sss123next@list.ru> | 2012-12-23 16:17:07 +0000 |
commit | af8c5b336e9609ed9c53b877dd7f57fb3d7194b9 (patch) | |
tree | f767b0911a71a12ddda0e3c1f85a775a4897b608 /plugins/New_GPG/src/messages.cpp | |
parent | 7bc7638adb66dd6110dfcb98aa74225b4c9c719c (diff) |
fixed deadlock on new key
added accounts column to own key selection dialog
git-svn-id: http://svn.miranda-ng.org/main/trunk@2815 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/New_GPG/src/messages.cpp')
-rwxr-xr-x | plugins/New_GPG/src/messages.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/New_GPG/src/messages.cpp b/plugins/New_GPG/src/messages.cpp index db17333da6..292ad1062c 100755 --- a/plugins/New_GPG/src/messages.cpp +++ b/plugins/New_GPG/src/messages.cpp @@ -410,7 +410,11 @@ int RecvMsgSvc(WPARAM w, LPARAM l) _tcscpy(tmp2, ptmp); mir_free(ptmp); _tcscat(tmp2, _T("\\")); - _tcscat(tmp2, _T("temporary_exported.asc")); + TCHAR *tmp3 = mir_a2t(get_random(5).c_str()); + _tcscat(tmp2, tmp3); + _tcscat(tmp2, _T(".asc")); + mir_free(tmp3); + //_tcscat(tmp2, _T("temporary_exported.asc")); DeleteFile(tmp2); wfstream f(tmp2, std::ios::out); while(!f.is_open()) @@ -443,6 +447,7 @@ int RecvMsgSvc(WPARAM w, LPARAM l) } if(result == pxNotFound) return 1; + DeleteFile(tmp2); //TODO: check gpg output for errors { char *tmp = NULL; @@ -543,7 +548,7 @@ int RecvMsgSvc(WPARAM w, LPARAM l) s2 += _tcslen(_T("-----END PGP PRIVATE KEY BLOCK-----")); } new_key.append(str.substr(s1,s2-s1)); - new_key_hcnt_mutex.lock(); + //new_key_hcnt_mutex.lock(); new_key_hcnt = ccs->hContact; ShowNewKeyDialog(); HistoryLog(ccs->hContact, db_event(msg, 0, 0, dbflags)); |