summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2011-03-31 20:32:41 +0300
committerGluzskiy Alexandr <sss123next@list.ru>2011-03-31 20:32:41 +0300
commit6890c7c42b314e31902cf174ad2ce1bdb8f62e1c (patch)
treedcc2c12075a4829dddc2bbc5a21bbcfa603e2e95
parent903cf85316f641a2d7fcc7fb87ed75889469d2dc (diff)
fixed another metacontacts problem, optimized some functions
-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])