From c2c8b96313665152d56efcb0f7bc6fa5888d6a59 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Mon, 1 Nov 2010 20:23:28 +0200 Subject: fixes --- utilities.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'utilities.cpp') diff --git a/utilities.cpp b/utilities.cpp index c1bb062..619cded 100644 --- a/utilities.cpp +++ b/utilities.cpp @@ -963,10 +963,11 @@ void send_encrypted_msgs_thread(HANDLE hContact) while(true) { char *key = UniGetContactSettingUtf(hContact, szGPGModuleName, "GPGPubKey", ""); - if(!key[0]) + while(!isContactSecured(hContact)) boost::this_thread::sleep(boost::posix_time::seconds(1)); - else if(!hcontact_data[hContact].msgs_to_send.empty()) + if(!hcontact_data[hContact].msgs_to_send.empty()) { + boost::this_thread::sleep(boost::posix_time::seconds(1)); list::iterator end = hcontact_data[hContact].msgs_to_send.end(); for(list::iterator p = hcontact_data[hContact].msgs_to_send.begin(); p != end; ++p) { -- cgit v1.2.3