diff options
author | Gluzskiy Alexandr <sss123next@list.ru> | 2010-09-09 22:56:44 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@list.ru> | 2010-09-09 22:56:44 +0300 |
commit | 6b1b91acffcc90db9f6d8e0c466d44e2a6819dc3 (patch) | |
tree | c452f4ccd55c4e7d8593935e821f4aa5417496af /messages.cpp | |
parent | e060779f0f9f76b9ffb4082c20d7c2b3a86c1513 (diff) |
modified: init.cpp
modified: messages.cpp
modified: new_gpg.rc
modified: options.cpp
modified: utilities.cpp
Diffstat (limited to 'messages.cpp')
-rw-r--r-- | messages.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/messages.cpp b/messages.cpp index 18db824..9dfe9d7 100644 --- a/messages.cpp +++ b/messages.cpp @@ -316,14 +316,15 @@ int RecvMsgSvc(WPARAM w, LPARAM l) delete [] tmp; str.append(tmp2); mir_free(tmp2); + f.close(); + DeleteFile(path.c_str()); } - f.close(); - DeleteFile(path.c_str()); if(str.empty()) { string str = pre->szMessage; mir_free((void**)pre->szMessage); str.insert(0, "Failed to decrypt GPG encrypted message:\n"); + debuglog<<"info: Failed to decrypt GPG encrypted message.\n"; pre->szMessage = mir_strdup(str.c_str()); return CallService(MS_PROTO_CHAINRECV, w, (LPARAM)ccs); } @@ -473,12 +474,13 @@ int SendMsgSvc(WPARAM w, LPARAM l) tmp[size]= '\0'; str.append(tmp); delete [] tmp; + f.close(); + DeleteFile(path.c_str()); } - f.close(); - DeleteFile(path.c_str()); - if(!str.length()) + if(str.empty()) { HistoryLog(hContact, "Failed to encrypt message with GPG", EVENTTYPE_MESSAGE, DBEF_SENT); + debuglog<<"info: Failed to encrypt message with GPG"; return CallService(MS_PROTO_CHAINRECV, w, (LPARAM)ccs); } // mir_free((void**)ccs->lParam); |