summaryrefslogtreecommitdiff
path: root/plugins/New_GPG/src/messages.cpp
diff options
context:
space:
mode:
authorAlexander Gluzsky <sss123next@list.ru>2016-05-16 16:10:20 +0000
committerAlexander Gluzsky <sss123next@list.ru>2016-05-16 16:10:20 +0000
commit9d076ee1769157730f26d93bfda1489791dd47c7 (patch)
treea5e471851a4b6cfe2ba21ceafd2254320f925e26 /plugins/New_GPG/src/messages.cpp
parent4bbad2f0985a74f86ecc27d7e95e2ecfcd2d3665 (diff)
plugins:
new_gpg: added another LANG* environment variable (required for gpg2) disabled return code checking (sometimes return error while operation finished succesfully), please do not touch and not remove commented out code. git-svn-id: http://svn.miranda-ng.org/main/trunk@16835 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/New_GPG/src/messages.cpp')
-rwxr-xr-xplugins/New_GPG/src/messages.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/plugins/New_GPG/src/messages.cpp b/plugins/New_GPG/src/messages.cpp
index eb54f53fb2..61db0a7d0e 100755
--- a/plugins/New_GPG/src/messages.cpp
+++ b/plugins/New_GPG/src/messages.cpp
@@ -186,7 +186,7 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD, DWOR
HistoryLog(hContact, db_event(msg, timestamp, 0, dbflags));
return;
}
- if (result == pxSuccessExitCodeInvalid)
+/* if (result == pxSuccessExitCodeInvalid) //sometime we have invalid return code after succesful decryption, this should be non-fatal at least
{
if(!bDebugLog)
{
@@ -197,7 +197,7 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD, DWOR
HistoryLog(hContact, db_event(msg, timestamp, 0, dbflags));
HistoryLog(hContact, db_event(Translate("failed to decrypt message, GPG returned error, turn on debug log for more details"), timestamp, 0, 0));
return;
- }
+ } */
//TODO: check gpg output for errors
_terminate = false;
@@ -480,11 +480,11 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l)
}
if (result == pxNotFound)
return 1;
- if (result == pxSuccessExitCodeInvalid)
+/* if (result == pxSuccessExitCodeInvalid) //sometime we have invalid return code after succesful decryption, this should be non-fatal at least
{
HistoryLog(ccs->hContact, db_event(Translate("failed to decrypt message, GPG returned error, turn on debug log for more details")));
return 1;
- }
+ } */
{
char *tmp = NULL;
s1 = output.find("gpg: key ") + mir_strlen("gpg: key ");
@@ -768,16 +768,16 @@ void SendMsgSvc_func(MCONTACT hContact, char *msg, DWORD flags)
}
else return;
}
- if (result == pxSuccessExitCodeInvalid) {
+// if (result == pxSuccessExitCodeInvalid) { //sometims gpg return error after succesful operation, this should be non-fatal at least
//mir_free(msg);
- HistoryLog(hContact, db_event(Translate("failed to encrypt message, GPG returned error, turn on debug log for more details"), 0, 0, DBEF_SENT));
- if(!bDebugLog)
- {
- boost::system::error_code e;
- boost::filesystem::remove(path, e);
- }
- return;
- }
+// HistoryLog(hContact, db_event(Translate("failed to encrypt message, GPG returned error, turn on debug log for more details"), 0, 0, DBEF_SENT));
+// if(!bDebugLog)
+// {
+// boost::system::error_code e;
+// boost::filesystem::remove(path, e);
+// }
+// return;
+// }
if (out.find("usage: ") != string::npos) {
MessageBox(0, TranslateT("Something is wrong, GPG does not understand us, aborting encryption."), TranslateT("Warning"), MB_OK);
//mir_free(msg);