diff options
author | Gluzskiy Alexandr <sss123next@list.ru> | 2010-11-01 18:16:40 +0200 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@list.ru> | 2010-11-01 18:16:40 +0200 |
commit | 1c2ab6cfda4eb3acf2e89ddc92c177fc8ed8f7b1 (patch) | |
tree | fc898d462486cc49df42172b938f06fa0458e73f | |
parent | d2ff7033051be0f7a5321ea0a09893372e52ae9e (diff) |
fixes
-rw-r--r-- | utilities.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/utilities.cpp b/utilities.cpp index e73d920..d3938a6 100644 --- a/utilities.cpp +++ b/utilities.cpp @@ -400,9 +400,9 @@ void CleanProtocolTmpThread(std::string proto) std::list<HANDLE>::iterator end = contacts.end(); for(std::list<HANDLE>::iterator i = contacts.begin(); i != end; ++i) {
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)*i, 0); LogSpamToFile(*i, _T("Deleted")); HistoryLogFunc(*i, "Deleted"); + CallService(MS_DB_CONTACT_DELETE, (WPARAM)*i, 0); } clean_mutex.unlock(); } @@ -428,9 +428,9 @@ void CleanProtocolExclThread(std::string proto) std::list<HANDLE>::iterator end = contacts.end();
for(std::list<HANDLE>::iterator i = contacts.begin(); i != end; ++i)
{
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)*i, 0);
LogSpamToFile(*i, _T("Deleted"));
HistoryLogFunc(*i, "Deleted");
+ CallService(MS_DB_CONTACT_DELETE, (WPARAM)*i, 0);
}
clean_mutex.unlock();
}
@@ -472,6 +472,8 @@ void HistoryLogFunc(HANDLE hContact, std::string message) {
if(gbHistoryLog)
{
+ if(hContact == INVALID_HANDLE_VALUE)
+ return;
std::string msg = message;
msg.append("\n");
msg.append("Protocol: ").append((char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0)).append(" Contact:");
|