diff options
-rw-r--r-- | src/rpc.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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" ); } |