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

(login_old, login): Added missing trailing newline in the log message

added in rev 0.22.
(login): Don't log when a person logs in as himself.
parent 51d74d9a
/*
* $Id: session.c,v 0.22 1994/02/27 17:05:52 ceder Exp $
* $Id: session.c,v 0.23 1994/03/05 22:17:01 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.22 1994/02/27 17:05:52 ceder Exp $";
static char *rcsid = "$Id: session.c,v 0.23 1994/03/05 22:17:01 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -179,7 +179,7 @@ login_old (Pers_no pers_no,
if (param.log_login == TRUE)
{
char *id = s_crea_c_str (pers_p->username);
log ("Login %d %s", ACTPERS, id);
log ("Login %d %s\n", ACTPERS, id);
string_free (id);
}
......@@ -199,6 +199,7 @@ login (Pers_no pers_no,
Bool invisible)
{
Person *pers_p;
Bool same_person;
GET_P_STAT(pers_p, pers_no, FAILURE);
......@@ -224,7 +225,8 @@ login (Pers_no pers_no,
/* 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)
same_person = (ACTPERS == pers_no);
if (same_person == FALSE)
++pers_p->sessions;
ACTPERS = pers_no;
......@@ -262,10 +264,10 @@ login (Pers_no pers_no,
mark_person_as_changed( pers_no );
if (param.log_login == TRUE)
if (param.log_login == TRUE && same_person == FALSE)
{
char *id = s_crea_c_str (pers_p->username);
log ("Login %d %s", ACTPERS, id);
log ("Login %d %s\n", ACTPERS, id);
string_free (id);
}
......
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