summaryrefslogtreecommitdiff
path: root/src/modules/protocols/protoaccs.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-10-07 12:50:40 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-10-07 12:50:40 +0000
commitc6fb861d7159279b6ee4a4dd678d4693ee56bac6 (patch)
treedf911e6eaf7bd944081aae96f5df9c2ef84c2476 /src/modules/protocols/protoaccs.cpp
parent95da57c8e9cf894adf3afae124a29d292b085c5e (diff)
death of old nasty clutch with MS_PROTO_ENUMPROTOCOLS & PROTOACCOUNT::type
git-svn-id: http://svn.miranda-ng.org/main/trunk@1799 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/protocols/protoaccs.cpp')
-rw-r--r--src/modules/protocols/protoaccs.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/modules/protocols/protoaccs.cpp b/src/modules/protocols/protoaccs.cpp
index c21e1a85c8..eef0ef61a4 100644
--- a/src/modules/protocols/protoaccs.cpp
+++ b/src/modules/protocols/protoaccs.cpp
@@ -46,7 +46,6 @@ static int EnumDbModules(const char *szModuleName, DWORD ofsModuleName, LPARAM l
if ( !Proto_GetAccount(szModuleName)) {
PROTOACCOUNT* pa = (PROTOACCOUNT*)mir_calloc(sizeof(PROTOACCOUNT));
pa->cbSize = sizeof(*pa);
- pa->type = PROTOTYPE_PROTOCOL;
pa->szModuleName = mir_strdup(szModuleName);
pa->szProtoName = mir_strdup(dbv.pszVal);
pa->tszAccountName = mir_a2t(szModuleName);
@@ -78,7 +77,6 @@ void LoadDbAccounts(void)
continue;
}
pa->cbSize = sizeof(*pa);
- pa->type = PROTOTYPE_PROTOCOL;
pa->szModuleName = mir_strdup(dbv.pszVal);
DBFreeVariant(&dbv);
@@ -271,14 +269,13 @@ int LoadAccountsModule(void)
continue;
if ( !Proto_IsAccountEnabled(pa)) {
- pa->type = PROTOTYPE_DISPROTO;
+ pa->bDynDisabled = TRUE;
continue;
}
- if ( !ActivateAccount(pa)) {
+ if ( !ActivateAccount(pa))
pa->bDynDisabled = TRUE;
- pa->type = PROTOTYPE_DISPROTO;
- } }
+ }
HookEvent(ME_SYSTEM_MODULESLOADED, InitializeStaticAccounts);
HookEvent(ME_SYSTEM_PRESHUTDOWN, UninitializeStaticAccounts);
@@ -430,7 +427,6 @@ BOOL ActivateAccount(PROTOACCOUNT* pa)
if (ppi == NULL)
return FALSE;
- pa->type = PROTOTYPE_PROTOCOL;
pa->ppro = ppi;
ppi->m_iDesiredStatus = ppi->m_iStatus = ID_STATUS_OFFLINE;
CreateProtoServiceEx(pa->szModuleName, PS_ADDTOLIST, (MIRANDASERVICEOBJ)stub1, pa->ppro);
@@ -539,7 +535,7 @@ void DeactivateAccount(PROTOACCOUNT* pa, bool bIsDynamic, bool bErase)
param->bIsDynamic = bIsDynamic;
param->bErase = bErase;
pa->ppro = NULL;
- pa->type = PROTOTYPE_DISPROTO;
+ pa->bDynDisabled = TRUE;
if (bIsDynamic)
mir_forkthread((pThreadFunc)DeactivationThread, param);
else