Commit 67696234 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(who_is_on_dynamic): New argument: active_last.

parent 5a53a54c
/*
* $Id: services.h,v 0.30 1996/08/03 01:29:21 ceder Exp $
* $Id: services.h,v 0.31 1996/08/03 21:03:15 ceder Exp $
* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -509,6 +509,7 @@ KOM_( who_is_on_ident (Who_info_ident_list *result));
extern Success
KOM_( who_is_on_dynamic (int want_visible,
int want_invisible,
long active_last,
Dynamic_session_info_list *result) );
/*
......
/*
* $Id: session.c,v 0.36 1996/08/03 01:32:12 ceder Exp $
* $Id: session.c,v 0.37 1996/08/03 21:07:22 ceder Exp $
* Copyright (C) 1991, 1992, 1993, 1994, 1996 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.36 1996/08/03 01:32:12 ceder Exp $";
static char *rcsid = "$Id: session.c,v 0.37 1996/08/03 21:07:22 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -529,6 +529,7 @@ who_is_on_ident( Who_info_ident_list *result )
extern Success
who_is_on_dynamic(int want_visible,
int want_invisible,
long active_last,
Dynamic_session_info_list *result)
{
Connection *cptr;
......@@ -550,6 +551,10 @@ who_is_on_dynamic(int want_visible,
else
include_it = want_visible;
if (active_last != 0 && ldifftime(tn, cptr->active_time) > active_last
&& cptr->flags.user_active_used)
include_it = 0;
if (include_it != 0)
++no_of_clients;
}
......@@ -567,6 +572,10 @@ who_is_on_dynamic(int want_visible,
else
include_it = want_visible;
if (active_last != 0 && ldifftime(tn, cptr->active_time) > active_last
&& cptr->flags.user_active_used)
include_it = 0;
if (include_it != 0)
{
init_dynamic_session_info(&result->sessions[i]);
......
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