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
14 #include <afsconfig.h>
15 #include <afs/param.h>
20 #include "TaAfsAdmSvrInternal.h"
24 * ROUTINES ___________________________________________________________________
29 // AfsAdmSvr_ChangeCell
30 // ...changes a cell's properties.
32 extern "C" int AfsAdmSvr_ChangeCell (UINT_PTR idClient, ASID idCell, LPAFSADMSVR_CHANGECELL_PARAMS pChange, ULONG *pStatus)
35 Action.Action = ACTION_CELL_CHANGE;
36 Action.idClient = idClient;
37 Action.idCell = idCell;
38 size_t iOp = AfsAdmSvr_BeginOperation (idClient, &Action);
40 Print (dlDETAIL, TEXT("Client 0x%08lX: ChangeCell (idCell=0x%08lX)"), idClient, idCell);
42 if (!AfsAdmSvr_fIsValidClient (idClient))
43 return FALSE_(ERROR_INVALID_PARAMETER,pStatus,iOp);
45 // Call AfsClass to actually do it
47 PTSPROPERTIES PtsProperties;
48 PtsProperties.idUserMax = (int)(pChange->idUserMax);
49 PtsProperties.idGroupMax = (int)(pChange->idGroupMax);
52 if (!AfsClass_SetPtsProperties ((LPIDENT)idCell, &PtsProperties, &status))
54 Print (dlERROR, TEXT("Client 0x%08lX: ChangeCell failed; error 0x%08lX"), idClient, status);
55 return FALSE_(status,pStatus,iOp);
58 AfsAdmSvr_TestProperties (idCell);
60 Print (dlDETAIL, TEXT("Client 0x%08lX: ChangeCell succeeded"), idClient);
61 AfsAdmSvr_EndOperation (iOp);
67 // AfsAdmSvr_SetRefreshRate
68 // ...changes the refresh rate for a specific cell
70 extern "C" int AfsAdmSvr_SetRefreshRate (UINT_PTR idClient, ASID idCell, ULONG cminRefreshRate, ULONG *pStatus)
72 if (!AfsAdmSvr_fIsValidClient (idClient))
73 return FALSE_(ERROR_INVALID_PARAMETER,pStatus);
75 Print (dlDETAIL, TEXT("Client 0x%08lX: Setting refresh rate to %lu minutes"), idClient, cminRefreshRate);
78 AfsAdmSvr_StopCellRefreshThread (idCell);
80 AfsAdmSvr_SetCellRefreshRate (idCell, cminRefreshRate);