summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.cpp2
-rw-r--r--messages.cpp14
-rw-r--r--new_gpg.rc18
3 files changed, 17 insertions, 17 deletions
diff --git a/init.cpp b/init.cpp
index 8af16e6..6f591ac 100644
--- a/init.cpp
+++ b/init.cpp
@@ -42,7 +42,7 @@ std::map<HANDLE, contact_data> hcontact_data;
PLUGININFOEX pluginInfo={
sizeof(PLUGININFOEX),
0,
- PLUGIN_MAKE_VERSION(0,0,0,10),
+ PLUGIN_MAKE_VERSION(0,0,0,11),
"new GPG encryption support plugin, based on code from old gpg plugin and secureim",
"sss",
"sss123next@list.ru",
diff --git a/messages.cpp b/messages.cpp
index 6875ece..3cb59c0 100644
--- a/messages.cpp
+++ b/messages.cpp
@@ -52,7 +52,8 @@ int RecvMsgSvc_func(HANDLE hContact, char *msg, DWORD flags)
_tcscat(tmp2, _T("\\"));
_tcscat(tmp2, _T("temporary_exported.asc"));
DeleteFile(tmp2);
- gpg_file_mutex.timed_lock(boost::posix_time::minutes(1));
+ while(!gpg_file_mutex.timed_lock(boost::posix_time::seconds(15)))
+ gpg_file_mutex.unlock();
wfstream f(tmp2, std::ios::out);
while(!f.is_open())
f.open(tmp2, std::ios::out);
@@ -312,7 +313,8 @@ int RecvMsgSvc_func(HANDLE hContact, char *msg, DWORD flags)
wstring path = tmp2;
path.append(_T("\\encrypted_data.asc"));
DeleteFile(path.c_str());
- gpg_file_mutex.timed_lock(boost::posix_time::minutes(1));
+ while(!gpg_file_mutex.timed_lock(boost::posix_time::seconds(15)))
+ gpg_file_mutex.unlock();
fstream f(path.c_str(), std::ios::out);
while(!f.is_open())
f.open(path.c_str(), std::ios::out);
@@ -500,7 +502,8 @@ int RecvMsgSvc_func(HANDLE hContact, char *msg, DWORD flags)
wstring path = tmp2;
mir_free(tmp2);
path += _T("\\decrypted_data");
- gpg_file_mutex.timed_lock(boost::posix_time::minutes(1));
+ while(!gpg_file_mutex.timed_lock(boost::posix_time::seconds(15)))
+ gpg_file_mutex.unlock();
fstream f(path.c_str(), std::ios::in | std::ios::ate | std::ios::binary);
if(f.is_open())
{
@@ -642,7 +645,8 @@ int SendMsgSvc_func(HANDLE hContact, char *msg, DWORD flags)
{
char *tmp;
tmp = mir_strdup(toUTF8(str).c_str());
- gpg_file_mutex.timed_lock(boost::posix_time::minutes(1));
+ while(!gpg_file_mutex.timed_lock(boost::posix_time::seconds(15)))
+ gpg_file_mutex.unlock();
fstream f(path.c_str(), std::ios::out);
while(!f.is_open())
f.open(path.c_str(), std::ios::out);
@@ -840,7 +844,7 @@ int SendMsgSvc(WPARAM w, LPARAM l)
return CallService(MS_PROTO_CHAINSEND, w, l);
}
}
- if(metaIsProtoMetaContacts(ccs->hContact))
+ if(metaIsProtoMetaContacts(ccs->hContact) || !isContactSecured(ccs->hContact))
{
mir_free(msg);
return CallService(MS_PROTO_CHAINSEND, w, l);
diff --git a/new_gpg.rc b/new_gpg.rc
index 97d20dd..b0c87ab 100644
--- a/new_gpg.rc
+++ b/new_gpg.rc
@@ -13,13 +13,11 @@
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
-// русский resources
+// Russian (Russia) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
-#ifdef _WIN32
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
#pragma code_page(1251)
-#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
@@ -177,7 +175,7 @@ END
//
#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO
+GUIDELINES DESIGNINFO
BEGIN
IDD_LOAD_PUBLIC_KEY, DIALOG
BEGIN
@@ -263,7 +261,7 @@ IDI_UNSECURED ICON "icons\\unsecured.ico"
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 0,0,0,10
+ FILEVERSION 0,0,0,11
PRODUCTVERSION 0,9,0,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
@@ -280,7 +278,7 @@ BEGIN
BLOCK "041904b0"
BEGIN
VALUE "FileDescription", "new_gpg"
- VALUE "FileVersion", "0.0.0.10"
+ VALUE "FileVersion", "0.0.0.11"
VALUE "InternalName", "new_gpg"
VALUE "LegalCopyright", "Copyright (C) 2010-2011 sss"
VALUE "OriginalFilename", "new_gpg"
@@ -294,18 +292,16 @@ BEGIN
END
END
-#endif // русский resources
+#endif // Russian (Russia) resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-// английский (США) resources
+// English (United States) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
-#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
@@ -361,7 +357,7 @@ BEGIN
RTEXT "Close:",IDC_STATIC,127,49,23,8
END
-#endif // английский (США) resources
+#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////