diff options
author | Alexander Gluzsky <sss123next@list.ru> | 2012-09-04 05:55:30 +0000 |
---|---|---|
committer | Alexander Gluzsky <sss123next@list.ru> | 2012-09-04 05:55:30 +0000 |
commit | 9639a4dceb40417ef5ba4f2733988e5c5789d3b1 (patch) | |
tree | 2ab08ee18a52c1c10e4904d0669fd62126254e2f /plugins/New_GPG/src/messages.cpp | |
parent | 4ec1e6ac7076575a1c12718ce00510295ee16a05 (diff) |
added support for uncommon keys import (keys without required fields like email)
added account name to account module name in account's list
fixed possible memmory corruptions in gpg output parser
git-svn-id: http://svn.miranda-ng.org/main/trunk@1534 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/New_GPG/src/messages.cpp')
-rwxr-xr-x | plugins/New_GPG/src/messages.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/plugins/New_GPG/src/messages.cpp b/plugins/New_GPG/src/messages.cpp index 5dc673c024..7b7766e3f2 100755 --- a/plugins/New_GPG/src/messages.cpp +++ b/plugins/New_GPG/src/messages.cpp @@ -664,7 +664,17 @@ void SendMsgSvc_func(HANDLE hContact, char *msg, DWORD flags) wstring file = toUTF16(get_random(10)); wstring path; extern bool bJabberAPI, bIsMiranda09; - char *tmp = UniGetContactSettingUtf(hContact, szGPGModuleName, "KeyID", ""); + LPSTR proto = (LPSTR)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0); + PROTOACCOUNT *acc = (PROTOACCOUNT*)CallService(MS_PROTO_GETCONTACTBASEPROTO, 0, (LPARAM)proto); + std::string acc_str; + if(acc) + { + acc_str = toUTF8(acc->tszAccountName); + acc_str += "("; + acc_str += acc->szModuleName; + acc_str += ")" ; + } + char *tmp = UniGetContactSettingUtf(hContact, szGPGModuleName, acc_str.empty()?"KeyID":acc_str.c_str(), ""); if(!tmp[0]) { mir_free(tmp); |