From b324d126c899dfe38d8eb8be8074beca60fdbb4c Mon Sep 17 00:00:00 2001 From: Michael Meffie Date: Tue, 9 Apr 2013 04:00:16 -0400 Subject: [PATCH] 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. Reviewed-on: http://gerrit.openafs.org/10082 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 495d6fcbba1630b136d9c1b4256f0a71666a8a7b) Change-Id: I4402838d761ab4bbb3e0798f219dfb825347b090 Reviewed-on: http://gerrit.openafs.org/10085 Tested-by: BuildBot Reviewed-by: Mark Vitale Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand --- src/afs/afs_analyze.c | 2 +- src/afs/afs_error.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/afs/afs_analyze.c b/src/afs/afs_analyze.c index 76a8156a9..2ecd38ef7 100644 --- a/src/afs/afs_analyze.c +++ b/src/afs/afs_analyze.c @@ -363,7 +363,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 7b0ad305e..a570f9c0d 100644 --- a/src/afs/afs_error.c +++ b/src/afs/afs_error.c @@ -214,6 +214,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) @@ -240,6 +241,7 @@ afs_FinalizeReq(struct vrequest *areq) return; while (i < AFS_MAXHOSTS) { areq->skipserver[i] = 0; + areq->lasterror[i] = 0; i++; } areq->busyCount = 0; -- 2.39.5