diff options
author | Gluzskiy Alexandr <sss123next@list.ru> | 2011-04-01 02:32:32 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@list.ru> | 2011-04-01 02:32:32 +0300 |
commit | f1a201a3c3aeb1ec731d50568eb583a21ed1440c (patch) | |
tree | 10269739c5a3cdcaf4e016c87d53b9156edf861f | |
parent | a7823b56a5b08f81248e83804349bc8e9fc61206 (diff) |
merge...
-rw-r--r-- | messages.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/messages.cpp b/messages.cpp index ee80e2f..924c0de 100644 --- a/messages.cpp +++ b/messages.cpp @@ -52,13 +52,13 @@ int RecvMsgSvc_func(HANDLE hContact, std::wstring str, char *msg, DWORD flags) } else { - DBWriteContactSettingByte(metaGetCurrent(hContact), szGPGModuleName, "GPGEncryption", 1); + DBWriteContactSettingByte(metaGetMostOnline(hContact), szGPGModuleName, "GPGEncryption", 1); setSrmmIcon(hContact); setClistIcon(hContact); } if(isContactHaveKey(hContact)) { - DBWriteContactSettingByte(metaGetCurrent(hContact), szGPGModuleName, "GPGEncryption", 1); + DBWriteContactSettingByte(metaGetMostOnline(hContact), szGPGModuleName, "GPGEncryption", 1); setSrmmIcon(hContact); setClistIcon(hContact); } @@ -694,11 +694,16 @@ int SendMsgSvc_func(HANDLE hContact, char *msg, DWORD flags) if(!gpg_thread.timed_join(boost::posix_time::seconds(10))) { gpg_thread.~thread(); + TerminateProcess(params.hProcess, 1); debuglog<<time_str()<<": GPG execution timed out, aborted\n"; - return CallService(MS_PROTO_CHAINSEND, w, l); + mir_free(msg); + return CallContactService(hContact, PSS_MESSAGE, (WPARAM)flags, (LPARAM)msg); } if(result == pxNotFound) - return CallService(MS_PROTO_CHAINSEND, w, l); + { + mir_free(msg); + return CallContactService(hContact, PSS_MESSAGE, (WPARAM)flags, (LPARAM)msg); + } } else if(MessageBox(0, _T("We trying to encrypt with untrusted key, do you want to trust this key permanently ?"), _T("Warning"), MB_YESNO) == IDYES) { |