diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2013-05-10 10:51:40 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2013-05-10 10:51:40 +0000 |
commit | 763272b5a51b73eedb013c209ad256f85afc8fd2 (patch) | |
tree | 23fb56ab35558b7e42a45eaa7cb40819ad2dfd8e /protocols | |
parent | 729ba893c3ede0053be2c15fa54c9f9d828dbe0b (diff) |
- fixed contacts duplicating on login
git-svn-id: http://svn.miranda-ng.org/main/trunk@4620 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/Skype/src/skype_contacts.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/protocols/Skype/src/skype_contacts.cpp b/protocols/Skype/src/skype_contacts.cpp index 041f76eaa2..6ef7f0cf1b 100644 --- a/protocols/Skype/src/skype_contacts.cpp +++ b/protocols/Skype/src/skype_contacts.cpp @@ -159,17 +159,14 @@ bool CSkypeProto::IsProtoContact(HANDLE hContact) HANDLE CSkypeProto::GetContactBySid(const wchar_t *sid)
{
- HANDLE hContact = ::db_find_first();
- while (hContact)
+ for (HANDLE hContact = ::db_find_first(this->m_szModuleName); hContact; hContact = ::db_find_next(hContact, this->m_szModuleName))
{
- if (this->IsProtoContact(hContact) && !this->IsChatRoom(hContact))
+ if ( !this->IsChatRoom(hContact))
{
mir_ptr<wchar_t> contactSid( ::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_LOGIN));
- if ( lstrcmp(contactSid, sid) == 0)
+ if (::wcsicmp(contactSid, sid) == 0)
return hContact;
}
-
- hContact = ::db_find_next(hContact);
}
return 0;
@@ -263,7 +260,7 @@ void __cdecl CSkypeProto::LoadContactList(void* data) contact->SetOnContactChangedCallback(
(CContact::OnContactChanged)&CSkypeProto::OnContactChanged,
this);
-
+ mir_ptr<wchar_t> sid( ::mir_utf8decodeW(contact->GetSid()));
HANDLE hContact = this->AddContact(contact);
if ( !isFirstLoad)
|