afsclient-cellopen-avoid-global-var-20050721

FIXES 20215

avoid use of global variable in CellOpen to avoid thread problems
This commit is contained in:
Peter Somogyi 2005-07-21 05:56:02 +00:00 committed by Derrick Brashear
parent da5187d4b4
commit 9e32ad3313

View File

@ -754,12 +754,6 @@ typedef struct afs_server {
int *valid;
} afs_server_t, *afs_server_p;
static afs_server_t servers[NUM_SERVER_TYPES]
= { {AFSCONF_KAUTHSERVICE, KA_MAINTENANCE_SERVICE, 0, 0, 0},
{AFSCONF_PROTSERVICE, PRSRV, 0, 0, 0},
{AFSCONF_VLDBSERVICE, USER_SERVICE_ID, 0, 0, 0}
};
/*
* afsclient_CellOpen - Open a particular cell for work as a particular
* user.
@ -803,6 +797,12 @@ afsclient_CellOpen(const char *cellName, const void *tokenHandle,
int scIndex;
char copyCell[MAXCELLCHARS];
afs_server_t servers[NUM_SERVER_TYPES]
= { {AFSCONF_KAUTHSERVICE, KA_MAINTENANCE_SERVICE, 0, 0, 0},
{AFSCONF_PROTSERVICE, PRSRV, 0, 0, 0},
{AFSCONF_VLDBSERVICE, USER_SERVICE_ID, 0, 0, 0}
};
if (client_init == 0) {
tst = ADMCLIENTNOINIT;
goto fail_afsclient_CellOpen;