From: Michael Meffie Date: Tue, 9 Apr 2013 08:00:16 +0000 (-0400) Subject: libafs: initialize hard mount last errors X-Git-Tag: openafs-stable-1_8_0pre1~1086 X-Git-Url: http://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=495d6fcbba1630b136d9c1b4256f0a71666a8a7b libafs: initialize hard mount last errors Initialize the values of the server last errors introduced in commit 94a8ce970d57498583e249ea61725fce1ee53a50 to avoid logging garbage for the last error codes. Change-Id: I0df262bad5d02231407d0dd65e1f1d32d791912f Reviewed-on: http://gerrit.openafs.org/10082 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- diff --git a/src/afs/afs_analyze.c b/src/afs/afs_analyze.c index 0e77b53..54b89ca 100644 --- a/src/afs/afs_analyze.c +++ b/src/afs/afs_analyze.c @@ -356,7 +356,7 @@ afs_PrintServerErrors(struct vrequest *areq, struct VenusFid *afid) tvp = afs_FindVolume(afid, READ_LOCK); if (tvp) { for (i = 0; i < AFS_MAXHOSTS; i++) { - if (tvp->serverHost[i]) { + if (areq->lasterror[i] && tvp->serverHost[i]) { sa = tvp->serverHost[i]->addr; if (sa) { address = ntohl(sa->sa_ip); diff --git a/src/afs/afs_error.c b/src/afs/afs_error.c index 89edbbc..1943fdd 100644 --- a/src/afs/afs_error.c +++ b/src/afs/afs_error.c @@ -212,6 +212,7 @@ afs_CopyError(struct vrequest *afrom, struct vrequest *ato) afs_FinalizeReq(ato); while (i < AFS_MAXHOSTS) { ato->skipserver[i] = afrom->skipserver[i]; + ato->lasterror[i] = afrom->lasterror[i]; i++; } if (afrom->tokenError) @@ -238,6 +239,7 @@ afs_FinalizeReq(struct vrequest *areq) return; while (i < AFS_MAXHOSTS) { areq->skipserver[i] = 0; + areq->lasterror[i] = 0; i++; } areq->busyCount = 0;