diff options
author | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2012-09-04 14:20:28 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2012-09-04 14:20:28 +0300 |
commit | 4b685bb64d79b8592dd2f8e3ccfb49f67e2947f3 (patch) | |
tree | b7588f869adbb94c7caae16bc26741919d845f23 /src/messages.cpp | |
parent | f5035ea73d5b942d4d91cac026c4b676f679f9a5 (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
Diffstat (limited to 'src/messages.cpp')
-rwxr-xr-x | src/messages.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/messages.cpp b/src/messages.cpp index 5dc673c..7b7766e 100755 --- a/src/messages.cpp +++ b/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); |