Commit 4359e4fc authored by Per Cederqvist's avatar Per Cederqvist

Handle visibility flag correctly when an implicit logout is performed

in login() and login_old().
parent 56946c7a
/*
* $Id: session.c,v 0.8 1992/04/06 21:19:12 ceder Exp $
* $Id: session.c,v 0.9 1992/04/07 14:53:31 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.8 1992/04/06 21:19:12 ceder Exp $";
static char *rcsid = "$Id: session.c,v 0.9 1992/04/07 14:53:31 ceder Exp $";
#include <time.h>
......@@ -88,7 +88,6 @@ login_old (Pers_no pers_no,
GET_P_STAT(pers_p, pers_no, FAILURE);
active_connection->invisible = FALSE;
#if 0
if ( !logins_allowed && !pers_p->privileges.wheel)
{
......@@ -106,6 +105,8 @@ login_old (Pers_no pers_no,
logout(); /*+++ How many tries are allowed before disconnection? */
active_connection->invisible = FALSE;
ACTPERS = pers_no;
ACT_P = pers_p;
......@@ -161,8 +162,6 @@ login (Pers_no pers_no,
GET_P_STAT(pers_p, pers_no, FAILURE);
active_connection->invisible = !!invisible; /* Normalize 17. */
#if 0
if ( !logins_allowed && !pers_p->privileges.wheel)
{
......@@ -180,6 +179,8 @@ login (Pers_no pers_no,
logout(); /*+++ How many tries are allowed before disconnection? */
active_connection->invisible = !!invisible; /* Normalize 17. */
ACTPERS = pers_no;
ACT_P = pers_p;
......@@ -233,7 +234,7 @@ logout( void )
{
if ( ACTPERS != 0 ) /* Is he logged in? Then log him out. */
{
if (active_connection->invisible)
if (!active_connection->invisible)
{
async_i_am_off( ACTPERS );
async_logout( ACTPERS, active_connection->session_no );
......@@ -340,7 +341,6 @@ change_what_i_am_doing (String what_am_i_doing)
if (!active_connection->invisible)
{
info.person = ACTPERS;
info.what_am_i_doing = active_connection->what_am_i_doing;
info.username = active_connection->username;
......
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