Commit 0682133f authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(login_old): Use active_connection->flags.invisible

	instead of active_connection->invisible.
(login): Likewise.
(logout): Likewise.
(pepsi): Likewise.
(change_what_i_am_doing): Likewise.
(who_is_on): Likewise.
(who_is_on_ident): Likewise.
(who_is_on_old): Likewise.
(who_is_on_dynamic): Likewise.  Sessions with no user are always invisible.
(user_active): Set active_connection->flags.user_active_used.
parent 28cf6816
/*
* $Id: session.c,v 0.33 1996/08/01 23:56:17 ceder Exp $
* $Id: session.c,v 0.34 1996/08/02 20:14:24 ceder Exp $
* Copyright (C) 1991, 1992, 1993, 1994 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.33 1996/08/01 23:56:17 ceder Exp $";
static char *rcsid = "$Id: session.c,v 0.34 1996/08/02 20:14:24 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -137,7 +137,7 @@ login_old (Pers_no pers_no,
logout(); /*+++ How many tries are allowed before disconnection? */
active_connection->invisible = FALSE;
active_connection->flags.invisible = FALSE;
ACTPERS = pers_no;
ACT_P = pers_p;
......@@ -222,9 +222,9 @@ login (Pers_no pers_no,
logout(); /*+++ How many tries are allowed before disconnection? */
if (invisible)
active_connection->invisible = TRUE;
active_connection->flags.invisible = TRUE;
else
active_connection->invisible = FALSE;
active_connection->flags.invisible = FALSE;
/* Don't count this as a new session if the person already was
logged on. The elisp-client version 0.38.1 logs on invisibly
......@@ -274,7 +274,7 @@ login (Pers_no pers_no,
string_free (id);
}
if (!active_connection->invisible)
if (!active_connection->flags.invisible)
async_login(ACTPERS, active_connection->session_no);
return OK;
......@@ -291,7 +291,7 @@ logout( void )
{
if ( ACTPERS != 0 ) /* Is he logged in? Then log him out. */
{
if (!active_connection->invisible)
if (!active_connection->flags.invisible)
{
async_logout( ACTPERS, active_connection->session_no );
}
......@@ -362,7 +362,7 @@ pepsi (Conf_no conference)
if ( conference != 0 )
cached_lock_conf( conference );
if (!active_connection->invisible)
if (!active_connection->flags.invisible)
{
info.person = ACTPERS;
info.what_am_i_doing = active_connection->what_am_i_doing;
......@@ -402,7 +402,7 @@ change_what_i_am_doing (String what_am_i_doing)
s_clear ( &active_connection->what_am_i_doing );
active_connection->what_am_i_doing = what_am_i_doing;
if (!active_connection->invisible)
if (!active_connection->flags.invisible)
{
info.person = ACTPERS;
info.what_am_i_doing = active_connection->what_am_i_doing;
......@@ -436,7 +436,7 @@ who_is_on( Who_info_list *result )
{
cptr = get_conn_by_number(session);
if ( cptr->person != NULL && cptr->invisible == FALSE )
if ( cptr->person != NULL && cptr->flags.invisible == FALSE )
++no_of_clients;
}
......@@ -448,7 +448,7 @@ who_is_on( Who_info_list *result )
{
cptr = get_conn_by_number(session);
if ( cptr->person != NULL && cptr->invisible == FALSE )
if ( cptr->person != NULL && cptr->flags.invisible == FALSE )
{
init_who_info(&result->info[ i ]);
result->info[ i ].person = cptr->pers_no;
......@@ -489,7 +489,7 @@ who_is_on_ident( Who_info_ident_list *result )
{
cptr = get_conn_by_number(session);
if ( cptr->person != NULL && cptr->invisible == FALSE )
if ( cptr->person != NULL && cptr->flags.invisible == FALSE )
++no_of_clients;
}
......@@ -501,7 +501,7 @@ who_is_on_ident( Who_info_ident_list *result )
{
cptr = get_conn_by_number(session);
if ( cptr->person != NULL && cptr->invisible == FALSE )
if ( cptr->person != NULL && cptr->flags.invisible == FALSE )
{
init_who_info_ident(&result->info[i]);
result->info[i].person = cptr->pers_no;
......@@ -545,7 +545,7 @@ who_is_on_dynamic(int want_visible,
{
cptr = get_conn_by_number(session);
if (cptr->person == NULL || cptr->invisible == TRUE)
if (cptr->person == NULL || cptr->flags.invisible == TRUE)
include_it = want_invisible;
else
include_it = want_visible;
......@@ -562,7 +562,7 @@ who_is_on_dynamic(int want_visible,
{
cptr = get_conn_by_number(session);
if (cptr->person == NULL || cptr->invisible == TRUE)
if (cptr->person == NULL || cptr->flags.invisible == TRUE)
include_it = want_invisible;
else
include_it = want_visible;
......@@ -575,10 +575,12 @@ who_is_on_dynamic(int want_visible,
result->sessions[i].working_conference = cptr->cwc;
result->sessions[i].idle_time = ldifftime(tn, cptr->active_time);
if (cptr->person == NULL || cptr->invisible == TRUE)
result->sessions[i].invisible = TRUE;
else
result->sessions[i].invisible = FALSE;
result->sessions[i].flags = cptr->flags;
/* Special case: sessions that are not logged in are
always invisible. */
if (cptr->person == NULL)
result->sessions[i].flags.invisible = TRUE;
result->sessions[i].what_am_i_doing = cptr->what_am_i_doing;
++i;
......@@ -741,7 +743,7 @@ who_is_on_old( Who_info_list_old *result )
{
cptr = get_conn_by_number(session);
if ( cptr->person != NULL && cptr->invisible == FALSE )
if ( cptr->person != NULL && cptr->flags.invisible == FALSE )
++no_of_clients;
}
......@@ -753,7 +755,7 @@ who_is_on_old( Who_info_list_old *result )
{
cptr = get_conn_by_number(session);
if ( cptr->person != NULL && cptr->invisible == FALSE )
if ( cptr->person != NULL && cptr->flags.invisible == FALSE )
{
init_who_info_old(&result->info[ i ]);
result->info[ i ].person = cptr->pers_no;
......@@ -922,5 +924,6 @@ extern Success
user_active(void)
{
time(&active_connection->active_time);
active_connection->flags.user_active_used = TRUE;
return OK;
}
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