Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Per Cederqvist
lyskom-server-ceder-1616-generations-topgit
Commits
83333f38
Commit
83333f38
authored
Apr 06, 1992
by
Per Cederqvist
Browse files
who_is_on*: Don't return invisible logins.
Fixed malloc bug in who_is_on_ident.
parent
b3ec5bfa
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/server/ChangeLog
View file @
83333f38
Mon Apr 6 23:11:29 1992 Per Cederqvist (ceder@ruben)
* session.c (who_is_on_ident): Fix malloc bug.
* session.c (who_is_on, who_is_on_ident, who_is_on_old): Don't
return invisible sessions.
Sat Apr 4 19:24:27 1992 Per Cederqvist (ceder@lysator)
* person.c
:
(get_person_stat): It is allowed to get the person
* person.c (get_person_stat): It is allowed to get the person
status before logging in so that it is possible to print a "last
login from:" message.
...
...
src/server/session.c
View file @
83333f38
/*
* $Id: session.c,v 0.
7
1992/04/0
4 17:33:46
ceder Exp $
* $Id: session.c,v 0.
8
1992/04/0
6 21:19:12
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.
7
1992/04/0
4 17:33:46
ceder Exp $"
;
static
char
*
rcsid
=
"$Id: session.c,v 0.
8
1992/04/0
6 21:19:12
ceder Exp $"
;
#include
<time.h>
...
...
@@ -370,7 +370,7 @@ who_is_on( Who_info_list *result )
{
cptr
=
get_conn_by_number
(
session
);
if
(
cptr
->
person
!=
NULL
)
if
(
cptr
->
person
!=
NULL
&&
cptr
->
invisible
==
FALSE
)
++
no_of_clients
;
}
...
...
@@ -382,7 +382,7 @@ who_is_on( Who_info_list *result )
{
cptr
=
get_conn_by_number
(
session
);
if
(
cptr
->
person
!=
NULL
)
if
(
cptr
->
person
!=
NULL
&&
cptr
->
invisible
==
FALSE
)
{
result
->
info
[
i
]
=
EMPTY_WHO_INFO
;
result
->
info
[
i
].
person
=
cptr
->
pers_no
;
...
...
@@ -431,19 +431,19 @@ who_is_on_ident( Who_info_ident_list *result )
{
cptr
=
get_conn_by_number
(
session
);
if
(
cptr
->
person
!=
NULL
)
if
(
cptr
->
person
!=
NULL
&&
cptr
->
invisible
==
FALSE
)
++
no_of_clients
;
}
result
->
no_of_persons
=
no_of_clients
;
result
->
info
=
tmp_alloc
(
no_of_clients
*
sizeof
(
Who_info
));
result
->
info
=
tmp_alloc
(
no_of_clients
*
sizeof
(
Who_info
_ident
));
for
(
session
=
0
,
i
=
0
;
i
<
no_of_clients
&&
(
session
=
traverse_connections
(
session
))
!=
0
;
)
{
cptr
=
get_conn_by_number
(
session
);
if
(
cptr
->
person
!=
NULL
)
if
(
cptr
->
person
!=
NULL
&&
cptr
->
invisible
==
FALSE
)
{
result
->
info
[
i
]
=
EMPTY_WHO_INFO_IDENT
;
result
->
info
[
i
].
person
=
cptr
->
pers_no
;
...
...
@@ -595,7 +595,7 @@ who_is_on_old( Who_info_list_old *result )
{
cptr
=
get_conn_by_number
(
session
);
if
(
cptr
->
person
!=
NULL
)
if
(
cptr
->
person
!=
NULL
&&
cptr
->
invisible
==
FALSE
)
++
no_of_clients
;
}
...
...
@@ -607,7 +607,7 @@ who_is_on_old( Who_info_list_old *result )
{
cptr
=
get_conn_by_number
(
session
);
if
(
cptr
->
person
!=
NULL
)
if
(
cptr
->
person
!=
NULL
&&
cptr
->
invisible
==
FALSE
)
{
result
->
info
[
i
]
=
EMPTY_WHO_INFO_OLD
;
result
->
info
[
i
].
person
=
cptr
->
pers_no
;
...
...
@@ -618,7 +618,7 @@ who_is_on_old( Who_info_list_old *result )
}
if
(
i
!=
no_of_clients
)
log
(
"who_is_on: i == %d, no_of_clients == %d
\n
"
,
log
(
"who_is_on
_old
: i == %d, no_of_clients == %d
\n
"
,
i
,
no_of_clients
);
return
OK
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment