X-Git-Url: https://git.openafs.org/?p=openafs.git;a=blobdiff_plain;f=src%2Fviced%2Fhost.c;h=23f1eedb2fb2ef3597e74f565da57afc539f6f10;hp=56af963e266288028d9de3fd9ca8805ac94e4ed2;hb=54ce580ef3fdb6c98a80d1104728b1e25d3fb9ff;hpb=62e28d9a0a6adc6e1f3c2938bfc530b54bea4158 diff --git a/src/viced/host.c b/src/viced/host.c index 56af963..23f1eed 100644 --- a/src/viced/host.c +++ b/src/viced/host.c @@ -2007,8 +2007,10 @@ h_PrintClient(register struct host *host, int held, StreamHandle_t * file) char tmpStr[256]; char tbuffer[32]; char hoststr[16]; + time_t LastCall, expTime; H_LOCK; + LastCall = host->LastCall; if (host->hostFlags & HOSTDELETED) { H_UNLOCK; return held; @@ -2017,12 +2019,13 @@ h_PrintClient(register struct host *host, int held, StreamHandle_t * file) "Host %s:%d down = %d, LastCall %s", afs_inet_ntoa_r(host->host, hoststr), ntohs(host->port), (host->hostFlags & VENUSDOWN), - afs_ctime((time_t *) & host->LastCall, tbuffer, + afs_ctime(&LastCall, tbuffer, sizeof(tbuffer))); (void)STREAM_WRITE(tmpStr, strlen(tmpStr), 1, file); for (client = host->FirstClient; client; client = client->next) { if (!client->deleted) { if (client->tcon) { + expTime = client->expTime; (void)afs_snprintf(tmpStr, sizeof tmpStr, " user id=%d, name=%s, sl=%s till %s", client->ViceId, h_UserName(client), @@ -2030,8 +2033,7 @@ h_PrintClient(register struct host *host, int held, StreamHandle_t * file) authClass ? "Authenticated" : "Not authenticated", client-> - authClass ? afs_ctime((time_t *) & client-> - expTime, tbuffer, + authClass ? afs_ctime(&expTime, tbuffer, sizeof(tbuffer)) : "No Limit\n"); (void)STREAM_WRITE(tmpStr, strlen(tmpStr), 1, file);