summaryrefslogtreecommitdiff
path: root/utilities.cpp
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 /utilities.cpp
parent903cf85316f641a2d7fcc7fb87ed75889469d2dc (diff)
fixed another metacontacts problem, optimized some functions
Diffstat (limited to 'utilities.cpp')
-rw-r--r--utilities.cpp8
1 files changed, 7 insertions, 1 deletions
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])