From bbc0a43dd52f35129599fa9774f52fc7ad8d089e Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Fri, 13 Aug 2010 00:41:24 +0300 Subject: modified: main.cpp modified: messages.cpp modified: new_gpg.icproj modified: new_gpg.vcproj --- messages.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'messages.cpp') 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; -- cgit v1.2.3