summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/rpc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rpc.c b/src/rpc.c
index e63f7fe..9345876 100644
--- a/src/rpc.c
+++ b/src/rpc.c
@@ -176,11 +176,12 @@ static void handleClient( int fd, struct ucred *creds )
while ( tok != NULL ) {
struct user *user = main_getUser( tok );
if ( user != NULL ) {
+ const int idleTime = (int)( time( NULL ) - ( user->lastActivity + user->lastActivityOffset ) );
fprintf( s, "[%s]\n"
"logoutTime=%lld\n"
"locked=%d\n"
"idleSeconds=%d\n",
- tok, (long long)user->logoutTime, (int)user->isLocked, (int)( time(NULL) - user->lastActivity ) );
+ tok, (long long)user->logoutTime, (int)user->isLocked, idleTime );
}
tok = strtok( NULL, " \t\n\r" );
}