From 0922841b20da6c15076f1467280a0e67407826d1 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Sun, 31 Oct 2010 13:02:56 +0200 Subject: log rework better gpg configuration check removed annoying message boxes (info now out to log) --- messages.cpp | 49 ++++++++++++++++++++----------------------------- 1 file changed, 20 insertions(+), 29 deletions(-) (limited to 'messages.cpp') diff --git a/messages.cpp b/messages.cpp index d1ee06d..92bdb78 100644 --- a/messages.cpp +++ b/messages.cpp @@ -85,14 +85,11 @@ int RecvMsgSvc(WPARAM w, LPARAM l) if(!gpg_thread.timed_join(boost::posix_time::seconds(10))) { gpg_thread.~thread(); - MessageBox(0, _T("GPG execution timed out, aborted"), _T(""), MB_OK); + debuglog< 0) - debuglog<<"info: found password in database for key id: "< 0) - debuglog<<"info: found password for all keys in database, trying to decrypt message from "<<(TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR)<<" with password\n"; + debuglog< 0) { @@ -330,13 +327,13 @@ int RecvMsgSvc(WPARAM w, LPARAM l) } else if(password) { - debuglog<<"info: found password in memory, trying to decrypt message from "<<(TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR)<<" with password\n"; + debuglog<timed_join(boost::posix_time::seconds(10))) { delete gpg_thread; - MessageBox(0, _T("GPG execution timed out, aborted"), _T(""), MB_OK); + debuglog<timed_join(boost::posix_time::seconds(10))) { delete gpg_thread; - MessageBox(0, _T("GPG execution timed out, aborted"), _T(""), MB_OK); + debuglog<timed_join(boost::posix_time::seconds(10))) { delete gpg_thread; - MessageBox(0, _T("GPG execution timed out, aborted"), _T(""), MB_OK); + debuglog<szMessage; mir_free((void**)pre->szMessage); str.insert(0, "Received unencrypted message:\n"); - debuglog<<"info: Failed to decrypt GPG encrypted message.\n"; + debuglog<szMessage = tmp; @@ -482,7 +479,7 @@ int RecvMsgSvc(WPARAM w, LPARAM l) string str = pre->szMessage; mir_free((void**)pre->szMessage); str.insert(0, "Received unencrypted message:\n"); - debuglog<<"info: Failed to decrypt GPG encrypted message.\n"; + debuglog<szMessage = mir_strdup(str.c_str()); return CallService(MS_PROTO_CHAINRECV, w, (LPARAM)ccs); } @@ -653,14 +650,11 @@ int SendMsgSvc(WPARAM w, LPARAM l) if(!gpg_thread.timed_join(boost::posix_time::seconds(10))) { gpg_thread.~thread(); - MessageBox(0, _T("GPG execution timed out, aborted"), _T(""), MB_OK); + debuglog<