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
13 #include <afs/param.h>
16 #include "TaAfsAdmSvrInternal.h"
20 * ROUTINES ___________________________________________________________________
25 // AfsAdmSvr_ChangeCell
26 // ...changes a cell's properties.
28 extern "C" int AfsAdmSvr_ChangeCell (UINT_PTR idClient
, ASID idCell
, LPAFSADMSVR_CHANGECELL_PARAMS pChange
, ULONG
*pStatus
)
31 Action
.Action
= ACTION_CELL_CHANGE
;
32 Action
.idClient
= idClient
;
33 Action
.idCell
= idCell
;
34 size_t iOp
= AfsAdmSvr_BeginOperation (idClient
, &Action
);
36 Print (dlDETAIL
, TEXT("Client 0x%08lX: ChangeCell (idCell=0x%08lX)"), idClient
, idCell
);
38 if (!AfsAdmSvr_fIsValidClient (idClient
))
39 return FALSE_(ERROR_INVALID_PARAMETER
,pStatus
,iOp
);
41 // Call AfsClass to actually do it
43 PTSPROPERTIES PtsProperties
;
44 PtsProperties
.idUserMax
= (int)(pChange
->idUserMax
);
45 PtsProperties
.idGroupMax
= (int)(pChange
->idGroupMax
);
48 if (!AfsClass_SetPtsProperties ((LPIDENT
)idCell
, &PtsProperties
, &status
))
50 Print (dlERROR
, TEXT("Client 0x%08lX: ChangeCell failed; error 0x%08lX"), idClient
, status
);
51 return FALSE_(status
,pStatus
,iOp
);
54 AfsAdmSvr_TestProperties (idCell
);
56 Print (dlDETAIL
, TEXT("Client 0x%08lX: ChangeCell succeeded"), idClient
);
57 AfsAdmSvr_EndOperation (iOp
);
63 // AfsAdmSvr_SetRefreshRate
64 // ...changes the refresh rate for a specific cell
66 extern "C" int AfsAdmSvr_SetRefreshRate (UINT_PTR idClient
, ASID idCell
, ULONG cminRefreshRate
, ULONG
*pStatus
)
68 if (!AfsAdmSvr_fIsValidClient (idClient
))
69 return FALSE_(ERROR_INVALID_PARAMETER
,pStatus
);
71 Print (dlDETAIL
, TEXT("Client 0x%08lX: Setting refresh rate to %lu minutes"), idClient
, cminRefreshRate
);
74 AfsAdmSvr_StopCellRefreshThread (idCell
);
76 AfsAdmSvr_SetCellRefreshRate (idCell
, cminRefreshRate
);