diff options
author | George Hazan <george.hazan@gmail.com> | 2013-09-07 12:16:37 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-09-07 12:16:37 +0000 |
commit | 2c62996eab8f006e64978ada3b48b8a26578bab4 (patch) | |
tree | 8ec36ff744dc4ca7bbce2237609cec3ccf780a9a /protocols/MRA/src/MraProto.cpp | |
parent | 03a0b643b94d5aa7f9c129fe73eea314d099cf56 (diff) |
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
Diffstat (limited to 'protocols/MRA/src/MraProto.cpp')
-rw-r--r-- | protocols/MRA/src/MraProto.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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<CMraProto>(_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 {
|