summaryrefslogtreecommitdiff
path: root/messages.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2011-04-01 02:32:32 +0300
committerGluzskiy Alexandr <sss123next@list.ru>2011-04-01 02:32:32 +0300
commitf1a201a3c3aeb1ec731d50568eb583a21ed1440c (patch)
tree10269739c5a3cdcaf4e016c87d53b9156edf861f /messages.cpp
parenta7823b56a5b08f81248e83804349bc8e9fc61206 (diff)
merge...
Diffstat (limited to 'messages.cpp')
-rw-r--r--messages.cpp13
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)
{