From 84261a1bda35dcdd1a4e56c3a573a169092f7363 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Thu, 9 Apr 2015 20:04:12 +0000 Subject: SkypeWeb: attempt to speed up contact lookup git-svn-id: http://svn.miranda-ng.org/main/trunk@12717 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/skype_proto.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'protocols/SkypeWeb/src/skype_proto.cpp') diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp index 4e3111ab2c..0056b2e330 100644 --- a/protocols/SkypeWeb/src/skype_proto.cpp +++ b/protocols/SkypeWeb/src/skype_proto.cpp @@ -35,6 +35,14 @@ PROTO(protoName, userName), password(NULL) dbEventType.eventType = SKYPE_DB_EVENT_TYPE_ACTION; dbEventType.descr = Translate("Action"); CallService(MS_DB_EVENT_REGISTERTYPE, 0, (LPARAM)&dbEventType); + + // make contact map + for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) + { + std::string cSkypename = ptrA(getStringA(hContact, SKYPE_SETTINGS_ID)); + if (!contactMap.count(cSkypename)) + contactMap[cSkypename] = hContact; + } } CSkypeProto::~CSkypeProto() -- cgit v1.2.3