From: Andrew Deason Date: Thu, 17 Mar 2011 15:43:23 +0000 (-0500) Subject: viced: Actually print client CPS X-Git-Tag: upstream/1.6.0.pre4^2~20 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=12507bcd2f3313fb97cb926a3eea67e0cd6e05ed;p=packages%2Fo%2Fopenafs.git viced: Actually print client CPS Client CPS was not getting output on SIGXCPU like the rest of the client information, since the conditional in the CPS loop was never true. Fix this so we traverse the CPS entries correctly. Reviewed-on: http://gerrit.openafs.org/4256 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 5df51a82947f0ff60d57f551c5faa136ad7f6e0f) Change-Id: Ic710d9ab4da5dc1fdb4a1ffca72590b043bff918 Reviewed-on: http://gerrit.openafs.org/4282 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- diff --git a/src/viced/host.c b/src/viced/host.c index 4f1dd7561..0698c0d3e 100644 --- a/src/viced/host.c +++ b/src/viced/host.c @@ -2775,7 +2775,7 @@ h_PrintClient(struct host *host, int flags, void *rock) client->CPS.prlist_len); (void)STREAM_WRITE(tmpStr, strlen(tmpStr), 1, file); if (client->CPS.prlist_val) { - for (i = 0; i > client->CPS.prlist_len; i++) { + for (i = 0; i < client->CPS.prlist_len; i++) { (void)afs_snprintf(tmpStr, sizeof tmpStr, " %d", client->CPS.prlist_val[i]); (void)STREAM_WRITE(tmpStr, strlen(tmpStr), 1, file);