Commit 4cdf6925 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(logout, get_session_info, get_session_info_ident): Use ldifftime()

instead of difftime().
parent a2f24d15
/*
* $Id: session.c,v 0.24 1994/03/08 22:59:11 ceder Exp $
* $Id: session.c,v 0.25 1994/04/04 15:19:05 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -28,7 +28,7 @@
* Session control and miscellaneous.
*/
static char *rcsid = "$Id: session.c,v 0.24 1994/03/08 22:59:11 ceder Exp $";
static char *rcsid = "$Id: session.c,v 0.25 1994/04/04 15:19:05 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -39,10 +39,8 @@ USE(rcsid);
#endif
#include <time.h>
#include <sys/types.h>
#ifndef HAVE_DIFFTIME
# include "tmp-difftime.h"
#endif
#include "ldifftime.h"
#include "s-string.h"
#include "kom-types.h"
#include "services.h"
......@@ -297,8 +295,8 @@ logout( void )
leave_conf();
ACT_P->total_time_present +=
difftime(time(&ACT_P->last_login),
active_connection->session_start);
ldifftime(time(&ACT_P->last_login),
active_connection->session_start);
cached_unlock_person( ACTPERS );
mark_person_as_changed( ACTPERS );
......@@ -540,8 +538,7 @@ get_session_info (Session_no session_no,
result->working_conference = cptr->cwc;
result->session = cptr->session_no;
result->connection_time = cptr->session_start;
result->idle_time = difftime(time(NULL),
cptr->last_request);
result->idle_time = ldifftime(time(NULL), cptr->last_request);
/* Backward compatibility. result->username is free()d in
prot_a_reply() prot-a.c. */
......@@ -574,8 +571,7 @@ get_session_info_ident (Session_no session_no,
result->working_conference = cptr->cwc;
result->session = cptr->session_no;
result->connection_time = cptr->session_start;
result->idle_time = difftime(time(NULL),
cptr->last_request);
result->idle_time = ldifftime(time(NULL), cptr->last_request);
result->username = cptr->username;
result->hostname = cptr->hostname;
result->ident_user = cptr->ident_user;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment