summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--messages.cpp1
-rw-r--r--metacontacts.cpp2
-rw-r--r--utilities.cpp8
3 files changed, 9 insertions, 2 deletions
diff --git a/messages.cpp b/messages.cpp
index 226445a..e1b3bdf 100644
--- a/messages.cpp
+++ b/messages.cpp
@@ -820,6 +820,7 @@ int SendMsgSvc(WPARAM w, LPARAM l)
{
mir_free(msg);
return CallService(MS_PROTO_CHAINSEND, w, l);
+// return returnNoError(ccs->hContact);
}
boost::thread *thr = new boost::thread(boost::bind(SendMsgSvc_func, ccs->hContact, msg, (DWORD)ccs->wParam));
return returnNoError(ccs->hContact);
diff --git a/metacontacts.cpp b/metacontacts.cpp
index c451d9f..8e282c6 100644
--- a/metacontacts.cpp
+++ b/metacontacts.cpp
@@ -43,7 +43,7 @@ HANDLE metaGetContact(HANDLE hContact)
{
if(bMetaContacts)
return (HANDLE)CallService(MS_MC_GETMETACONTACT,(WPARAM)hContact,0);
- return 0;
+ return hContact;
}
bool metaIsSubcontact(HANDLE hContact)
{
diff --git a/utilities.cpp b/utilities.cpp
index 8a2fe53..f05ebed 100644
--- a/utilities.cpp
+++ b/utilities.cpp
@@ -975,7 +975,13 @@ void AddHandlers()
bool isContactSecured(HANDLE hContact)
{
- if(!DBGetContactSettingByte(hContact, szGPGModuleName, "GPGEncryption", 0))
+ BYTE gpg_enc = DBGetContactSettingByte(hContact, szGPGModuleName, "GPGEncryption", 0);
+ if(!gpg_enc)
+ {
+ hContact = metaGetContact(hContact);
+ gpg_enc = DBGetContactSettingByte(hContact, szGPGModuleName, "GPGEncryption", 0);
+ }
+ if(!gpg_enc)
return false;
TCHAR *key = UniGetContactSettingUtf(hContact, szGPGModuleName, "GPGPubKey", _T(""));
if(!key[0])