summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2010-12-04 15:45:20 +0200
committerGluzskiy Alexandr <sss123next@list.ru>2010-12-04 15:45:20 +0200
commit88171633a72848344976dd5d2ad4f4f0b13d75c4 (patch)
tree10f75f5b530a95b6bef3e9eebeebeab69261ff8b
parent9d004eaf0b0d5870257928ee5a462562f86faecf (diff)
modified: utilities.cpp
-rw-r--r--utilities.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/utilities.cpp b/utilities.cpp
index b12eba4..19c2d79 100644
--- a/utilities.cpp
+++ b/utilities.cpp
@@ -391,9 +391,11 @@ void CleanProtocolTmpThread(std::string proto)
std::list<HANDLE> contacts;
for(HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); hContact; hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0))
{
- if(!strcmp(proto.c_str(), (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0)))
- if(DBGetContactSettingByte(hContact, "CList", "NotOnList", 0)|| (_T("Not In List")== DBGetContactSettingStringPAN(hContact,"CList","Group",_T(""))))
- contacts.push_back(hContact);
+ char *proto_tmp = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ if(proto_tmp)
+ if(!strcmp(proto.c_str(), proto_tmp))
+ if(DBGetContactSettingByte(hContact, "CList", "NotOnList", 0)|| (_T("Not In List")== DBGetContactSettingStringPAN(hContact,"CList","Group",_T(""))))
+ contacts.push_back(hContact);
}
boost::this_thread::sleep(boost::posix_time::seconds(5));
clean_mutex.lock();
@@ -419,9 +421,11 @@ void CleanProtocolExclThread(std::string proto)
std::list<HANDLE> contacts;
for(HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); hContact; hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0))
{
- if(!strcmp(proto.c_str(), (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0)))
- if(DBGetContactSettingByte(hContact, "CList", "NotOnList", 0) && DBGetContactSettingByte(hContact, pluginName, "Excluded", 0))
- contacts.push_back(hContact);
+ char *proto_tmp = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ if(proto_tmp)
+ if(!strcmp(proto.c_str(), proto_tmp))
+ if(DBGetContactSettingByte(hContact, "CList", "NotOnList", 0) && DBGetContactSettingByte(hContact, pluginName, "Excluded", 0))
+ contacts.push_back(hContact);
}
boost::this_thread::sleep(boost::posix_time::seconds(5));
clean_mutex.lock();