summaryrefslogtreecommitdiff
path: root/messages.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2010-08-13 00:41:24 +0300
committerGluzskiy Alexandr <sss123next@list.ru>2010-08-13 00:41:24 +0300
commitbbc0a43dd52f35129599fa9774f52fc7ad8d089e (patch)
treebe36ea6eff1f9e0f54142b9995cba5125f3730b3 /messages.cpp
parent1c90e6b0df2d7c9c723dfa0c64f07a002ba1507f (diff)
modified: main.cpp
modified: messages.cpp modified: new_gpg.icproj modified: new_gpg.vcproj
Diffstat (limited to 'messages.cpp')
-rw-r--r--messages.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/messages.cpp b/messages.cpp
index 8bc2914..792e3fa 100644
--- a/messages.cpp
+++ b/messages.cpp
@@ -121,6 +121,11 @@ int RecvMsgSvc(WPARAM w, LPARAM l)
}
f.close();
DeleteFile(path.c_str());
+ if(!str.length())
+ {
+ pre->szMessage = "Failed to decrypt GPG encrypted message";
+ return CallService(MS_PROTO_CHAINRECV, w, (LPARAM)ccs);
+ }
}
{
if(str.length() > 0)
@@ -200,6 +205,11 @@ int SendMsgSvc(WPARAM w, LPARAM l)
}
f.close();
DeleteFile(path.c_str());
+ if(!str.length())
+ {
+ ccs->lParam = (LPARAM)"Failed to encrypt message with GPG";
+ return CallService(MS_PROTO_CHAINRECV, w, (LPARAM)ccs);
+ }
mir_free((void**)ccs->lParam);
char *utf = mir_utf8encodeW(str.c_str());
ccs->lParam = (LPARAM)utf;