diff options
author | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2012-10-16 10:23:23 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2012-10-16 10:23:23 +0300 |
commit | 70db5d1f4792f41f34c232c97ac30b45672e0f67 (patch) | |
tree | 1ad439aad24023e84ab42ad2352bceec11ae9540 | |
parent | e5601190b76f3127a095d389d8efb45590221555 (diff) |
fixed #60
-rwxr-xr-x | messages.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/messages.cpp b/messages.cpp index bab5fb0..7eb598c 100755 --- a/messages.cpp +++ b/messages.cpp @@ -668,8 +668,8 @@ void SendMsgSvc_func(HANDLE hContact, char *msg, DWORD flags) if(!tmp[0]) { mir_free(tmp); - HistoryLog(hContact, db_event("Failed to encrypt message with GPG", 0,0, DBEF_SENT)); - hcontact_data[hContact].msgs_to_pass.push_back("Failed to encrypt message with GPG"); + HistoryLog(hContact, db_event("Failed to encrypt message with GPG (not found key for encryption in db)", 0,0, DBEF_SENT)); + hcontact_data[hContact].msgs_to_pass.push_back("Failed to encrypt message with GPG (not found key for encryption in db)"); mir_free(msg); CallContactService(hContact, PSS_MESSAGE, (WPARAM)flags, (LPARAM)msg); return; @@ -694,13 +694,11 @@ void SendMsgSvc_func(HANDLE hContact, char *msg, DWORD flags) path += file; cmd += _T("\""); { - char *tmp; - tmp = mir_strdup(toUTF8(str).c_str()); fstream f(path.c_str(), std::ios::out); while(!f.is_open()) f.open(path.c_str(), std::ios::out); - f<<tmp; - mir_free(tmp); + std::string tmp = toUTF8(str); + f.write(tmp.c_str(), tmp.size()); f.close(); } gpg_execution_params params; |