From 2c62996eab8f006e64978ada3b48b8a26578bab4 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 7 Sep 2013 12:16:37 +0000 Subject: MRA: - r/o server groups' support - extensive use of CMStringA - further code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@5995 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/MRA/src/MraProto.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'protocols/MRA/src/MraProto.cpp') diff --git a/protocols/MRA/src/MraProto.cpp b/protocols/MRA/src/MraProto.cpp index a6e05e5c3e..a42d404bfa 100644 --- a/protocols/MRA/src/MraProto.cpp +++ b/protocols/MRA/src/MraProto.cpp @@ -9,7 +9,8 @@ static int MraExtraIconsApplyAll(WPARAM, LPARAM) CMraProto::CMraProto(const char* _module, const TCHAR* _displayName) : PROTO(_module, _displayName), - m_bLoggedIn(false) + m_bLoggedIn(false), + m_groups(5, NumericKeySortT) { InitializeCriticalSectionAndSpinCount(&csCriticalSectionSend, 0); MraSendQueueInitialize(0, &hSendQueueHandle); @@ -99,7 +100,7 @@ int CMraProto::OnModulesLoaded(WPARAM, LPARAM) HookProtoEvent(ME_WAT_NEWSTATUS, &CMraProto::MraMusicChanged); // всех в offline // тк unsaved values сохраняются их нужно инициализировать - for (HANDLE hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact)) + for (HANDLE hContact = db_find_first(m_szModuleName); hContact != NULL; hContact = db_find_next(hContact, m_szModuleName)) SetContactBasicInfoW(hContact, SCBIFSI_LOCK_CHANGES_EVENTS, (SCBIF_ID|SCBIF_GROUP_ID|SCBIF_SERVER_FLAG|SCBIF_STATUS), -1, -1, 0, 0, ID_STATUS_OFFLINE, 0, 0, 0); // unsaved values @@ -527,11 +528,10 @@ int CMraProto::SetStatus(int iNewStatus) dwOldStatusMode = InterlockedExchange((volatile LONG*)&m_iStatus, m_iDesiredStatus); // всех в offline, только если мы бывали подключены - if (dwOldStatusMode > ID_STATUS_OFFLINE) { - // функция сама проверяет принадлежность контакта к MRA - for (HANDLE hContact = db_find_first();hContact != NULL;hContact = db_find_next(hContact)) + if (dwOldStatusMode > ID_STATUS_OFFLINE) + for (HANDLE hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) SetContactBasicInfoW(hContact, SCBIFSI_LOCK_CHANGES_EVENTS, (SCBIF_ID|SCBIF_GROUP_ID|SCBIF_SERVER_FLAG|SCBIF_STATUS), -1, -1, 0, 0, ID_STATUS_OFFLINE, 0, 0, 0); - } + Netlib_CloseHandle(m_hConnection); } else { -- cgit v1.2.3