]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-viced-hpr-error-handling-20080107
authorDerrick Brashear <shadow@dementia.org>
Mon, 7 Jan 2008 20:25:41 +0000 (20:25 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 7 Jan 2008 20:25:41 +0000 (20:25 +0000)
LICENSE IPL10

fix ubik reinit issue reported by jhutz@cs

(cherry picked from commit be4da54fa06c0a6f43c0be09e1339d29cc4b5e5a)

src/viced/afsfileprocs.c
src/viced/host.c

index 105ee0ff6f063ff7547ac95c8d93088e3a62357d..9460664a58be4c95929e97076a2650f9afa416ac 100644 (file)
@@ -340,7 +340,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);
index cc36eca21fc7b21b71d345cc9c9d78826f0f1895..bb80cdfc4040b0e56a59b0ab0d4403d3dcefaad1 100644 (file)
@@ -375,7 +375,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;
@@ -406,7 +409,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++)
@@ -428,7 +434,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);
@@ -449,7 +458,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;