summaryrefslogtreecommitdiff
path: root/src/messages.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2012-10-16 10:22:43 +0300
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2012-10-16 10:22:43 +0300
commit925f25fc28a6edfe444412e13887456902514f13 (patch)
tree34eca17bc7f139fc192d9dfc01d9188ae1f39872 /src/messages.cpp
parent8f69e474391d3cc97d6bf0b2a355a233c1c64a3f (diff)
fixed #60
Diffstat (limited to 'src/messages.cpp')
-rwxr-xr-xsrc/messages.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/messages.cpp b/src/messages.cpp
index bab5fb0..7eb598c 100755
--- a/src/messages.cpp
+++ b/src/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;