Commit d5e711d3 authored by Per Cederqvist's avatar Per Cederqvist

(login): Don't update the sessions count when logging in as the same

person which already is logged in.
parent 4e3090db
/*
* $Id: session.c,v 0.20 1994/02/20 16:20:14 ceder Exp $
* $Id: session.c,v 0.21 1994/02/27 15:24:54 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.20 1994/02/20 16:20:14 ceder Exp $";
static char *rcsid = "$Id: session.c,v 0.21 1994/02/27 15:24:54 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -213,13 +213,18 @@ login (Pers_no pers_no,
active_connection->invisible = !!invisible; /* Normalize 17. */
/* 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
automatically to indicate that the user is inactve. */
if (ACTPERS != pers_no)
++pers_p->sessions;
ACTPERS = pers_no;
ACT_P = pers_p;
cached_lock_person(pers_no);
pers_p->last_login = time(&active_connection->session_start);
++pers_p->sessions;
s_strcpy(&pers_p->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