2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
10 #include <afs/param.h>
13 #include "TaAfsAdmSvrInternal.h"
17 * ROUTINES ___________________________________________________________________
22 // AfsAdmSvr_ChangeCell
23 // ...changes a cell's properties.
25 int AfsAdmSvr_ChangeCell (DWORD idClient, ASID idCell, LPAFSADMSVR_CHANGECELL_PARAMS pChange, ULONG *pStatus)
28 Action.Action = ACTION_CELL_CHANGE;
29 Action.idClient = idClient;
30 Action.idCell = idCell;
31 size_t iOp = AfsAdmSvr_BeginOperation (idClient, &Action);
33 Print (dlDETAIL, TEXT("Client 0x%08lX: ChangeCell (idCell=0x%08lX)"), idClient, idCell);
35 if (!AfsAdmSvr_fIsValidClient (idClient))
36 return FALSE_(ERROR_INVALID_PARAMETER,pStatus,iOp);
38 // Call AfsClass to actually do it
40 PTSPROPERTIES PtsProperties;
41 PtsProperties.idUserMax = (int)(pChange->idUserMax);
42 PtsProperties.idGroupMax = (int)(pChange->idGroupMax);
45 if (!AfsClass_SetPtsProperties ((LPIDENT)idCell, &PtsProperties, &status))
47 Print (dlERROR, TEXT("Client 0x%08lX: ChangeCell failed; error 0x%08lX"), idClient, status);
48 return FALSE_(status,pStatus,iOp);
51 AfsAdmSvr_TestProperties (idCell);
53 Print (dlDETAIL, TEXT("Client 0x%08lX: ChangeCell succeeded"), idClient);
54 AfsAdmSvr_EndOperation (iOp);
60 // AfsAdmSvr_SetRefreshRate
61 // ...changes the refresh rate for a specific cell
63 int AfsAdmSvr_SetRefreshRate (DWORD idClient, ASID idCell, ULONG cminRefreshRate, ULONG *pStatus)
65 if (!AfsAdmSvr_fIsValidClient (idClient))
66 return FALSE_(ERROR_INVALID_PARAMETER,pStatus);
68 Print (dlDETAIL, TEXT("Client 0x%08lX: Setting refresh rate to %lu minutes"), idClient, cminRefreshRate);
71 AfsAdmSvr_StopCellRefreshThread (idCell);
73 AfsAdmSvr_SetCellRefreshRate (idCell, cminRefreshRate);