From: Derrick Brashear Date: Mon, 7 Jan 2008 20:22:10 +0000 (+0000) Subject: viced-hpr-error-handling-20080107 X-Git-Tag: BP-openafs-windows-kdfs-ifs~225 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=be4da54fa06c0a6f43c0be09e1339d29cc4b5e5a;p=packages%2Fo%2Fopenafs.git viced-hpr-error-handling-20080107 LICENSE IPL10 fix ubik reinit issue reported by jhutz@cs --- diff --git a/src/viced/afsfileprocs.c b/src/viced/afsfileprocs.c index e8bed09f2..6b6f2cd01 100644 --- a/src/viced/afsfileprocs.c +++ b/src/viced/afsfileprocs.c @@ -342,7 +342,8 @@ CallPreamble(register struct rx_call *acall, int activecall, hpr_End(uclient); code = hpr_Initialize(&uclient); - assert(pthread_setspecific(viced_uclient_key, (void *)uclient) == 0); + if (!code) + assert(pthread_setspecific(viced_uclient_key, (void *)uclient) == 0); H_LOCK; #else code = pr_Initialize(2, AFSDIR_SERVER_ETC_DIRPATH, 0); diff --git a/src/viced/host.c b/src/viced/host.c index c4db97559..f26439c63 100644 --- a/src/viced/host.c +++ b/src/viced/host.c @@ -384,7 +384,10 @@ hpr_GetHostCPS(afs_int32 host, prlist *CPS) if (!uclient) { code = hpr_Initialize(&uclient); - assert(pthread_setspecific(viced_uclient_key, (void *)uclient) == 0); + if (!code) + assert(pthread_setspecific(viced_uclient_key, (void *)uclient) == 0); + else + return code; } over = 0; @@ -415,7 +418,10 @@ hpr_NameToId(namelist *names, idlist *ids) if (!uclient) { code = hpr_Initialize(&uclient); - assert(pthread_setspecific(viced_uclient_key, (void *)uclient) == 0); + if (!code) + assert(pthread_setspecific(viced_uclient_key, (void *)uclient) == 0); + else + return code; } for (i = 0; i < names->namelist_len; i++) @@ -437,7 +443,10 @@ hpr_IdToName(idlist *ids, namelist *names) if (!uclient) { code = hpr_Initialize(&uclient); - assert(pthread_setspecific(viced_uclient_key, (void *)uclient) == 0); + if (!code) + assert(pthread_setspecific(viced_uclient_key, (void *)uclient) == 0); + else + return code; } code = ubik_PR_IDToName(uclient, 0, ids, names); @@ -458,7 +467,10 @@ hpr_GetCPS(afs_int32 id, prlist *CPS) if (!uclient) { code = hpr_Initialize(&uclient); - assert(pthread_setspecific(viced_uclient_key, (void *)uclient) == 0); + if (!code) + assert(pthread_setspecific(viced_uclient_key, (void *)uclient) == 0); + else + return code; } over = 0;