PVOID Server_LoadPreferences (LPIDENT lpiServer) { LPSERVER_PREF psp = New (SERVER_PREF); if (!RestorePreferences (lpiServer, psp, sizeof(SERVER_PREF))) { Alert_SetDefaults (&psp->oa); psp->perWarnAggFull = perDEFAULT_AGGFULL_WARNING; psp->perWarnSetFull = perDEFAULT_SETFULL_WARNING; psp->fWarnSvcStop = fDEFAULT_SVCSTOP_WARNING; psp->fWarnSvrTimeout = TRUE; psp->fWarnSetNoVLDB = TRUE; psp->fWarnSetNoServ = TRUE; psp->fWarnAggNoServ = TRUE; psp->fWarnAggAlloc = FALSE; psp->rLast.right = 0; psp->fOpen = FALSE; psp->fExpandTree = TRUE; } psp->fIsMonitored = TRUE; // until dispatch.cpp sets it otherwise Alert_Initialize (&psp->oa); return psp; }
PVOID Filesets_LoadPreferences (LPIDENT lpiFileset) { LPFILESET_PREF pfp = New (FILESET_PREF); if (!RestorePreferences (lpiFileset, pfp, sizeof(FILESET_PREF))) { pfp->perWarnSetFull = -1; // use the server's default value Alert_SetDefaults (&pfp->oa); } Alert_Initialize (&pfp->oa); return pfp; }
PVOID Aggregates_LoadPreferences (LPIDENT lpiAggregate) { LPAGGREGATE_PREF pap = New (AGGREGATE_PREF); if (!RestorePreferences (lpiAggregate, pap, sizeof(AGGREGATE_PREF))) { pap->perWarnAggFull = -1; // use the server's default value pap->fWarnAggAlloc = FALSE; Alert_SetDefaults (&pap->oa); } Alert_Initialize (&pap->oa); return pap; }
PVOID Services_LoadPreferences (LPIDENT lpiService) { LPSERVICE_PREF psp = New (SERVICE_PREF); if (!RestorePreferences (lpiService, psp, sizeof(SERVICE_PREF))) { psp->fWarnSvcStop = TRUE; Alert_SetDefaults (&psp->oa); Services_GuessLogName (psp->szLogFile, lpiService); // write the logfile down so we won't have to guess again. StorePreferences (lpiService, psp, sizeof(SERVICE_PREF)); } Alert_Initialize (&psp->oa); return psp; }