From 9e32ad33139376f6d109addb8add5024915bf025 Mon Sep 17 00:00:00 2001 From: Peter Somogyi Date: Thu, 21 Jul 2005 05:56:02 +0000 Subject: [PATCH] afsclient-cellopen-avoid-global-var-20050721 FIXES 20215 avoid use of global variable in CellOpen to avoid thread problems --- src/libadmin/client/afs_clientAdmin.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/libadmin/client/afs_clientAdmin.c b/src/libadmin/client/afs_clientAdmin.c index f256586780..b844260489 100644 --- a/src/libadmin/client/afs_clientAdmin.c +++ b/src/libadmin/client/afs_clientAdmin.c @@ -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;