rx: Remove RX_CALL_BUSY
[openafs.git] / src / WINNT / afsadmsvr / TaAfsAdmSvrClientCell.cpp
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  *
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
8  */
9
10 #include <winsock2.h>
11 #include <ws2tcpip.h>
12
13 extern "C" {
14 #include <afsconfig.h>
15 #include <afs/param.h>
16 #include <afs/stds.h>
17 #include <roken.h>
18 }
19
20 #include "TaAfsAdmSvrClientInternal.h"
21
22
23 /*
24  * ROUTINES ___________________________________________________________________
25  *
26  */
27
28 BOOL ADMINAPI asc_CellChange (UINT_PTR idClient, ASID idCell, LPAFSADMSVR_CHANGECELL_PARAMS pChange, ULONG *pStatus)
29 {
30    BOOL rc = TRUE;
31    ULONG status = 0;
32
33    RpcTryExcept
34       {
35       if ((rc = AfsAdmSvr_ChangeCell (idClient, idCell, pChange, &status)) != FALSE)
36          {
37          // If we succeeded in changing this cell's properties, get the
38          // newest values for our cache.
39          //
40          ASOBJPROP Properties;
41          rc = asc_ObjectPropertiesGet (idClient, GET_ALL_DATA, idCell, idCell, &Properties, &status);
42          }
43       }
44    RpcExcept(1)
45       {
46       rc = FALSE;
47       status = RPC_S_CALL_FAILED_DNE;
48       }
49    RpcEndExcept
50
51    if (!rc && pStatus)
52       *pStatus = status;
53    return rc;
54 }
55
56
57 BOOL ADMINAPI asc_CellRefreshRateSet (UINT_PTR idClient, ASID idCell, ULONG cminRefreshRate, ULONG *pStatus)
58 {
59    BOOL rc = TRUE;
60    ULONG status = 0;
61
62    RpcTryExcept
63       {
64       rc = AfsAdmSvr_SetRefreshRate (idClient, idCell, cminRefreshRate, &status);
65       }
66    RpcExcept(1)
67       {
68       rc = FALSE;
69       status = RPC_S_CALL_FAILED_DNE;
70       }
71    RpcEndExcept
72
73    if (!rc && pStatus)
74       *pStatus = status;
75    return rc;
76 }
77