Skip to content
GitLab
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
2004279b
Commit
2004279b
authored
May 18, 1992
by
Per Cederqvist
Browse files
New bit in the Connection struct: username_valid.
parent
efbb80c1
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/server/ChangeLog
View file @
2004279b
Mon May 18 23:27:04 1992 Per Cederqvist (ceder@lysator)
* connections.h (Connection): Added the boolean field
username_valid.
* internal-connections.c (new_client, EMPTY_CONNECTION):
Initialize it.
* prot-a.c (prot_a_parse_packet): Use it to test if username is
set or not (instead of just assuming that an empty username is
unset).
Thu Apr 16 00:46:50 1992 Per Cederqvist (ceder@lysator)
* Use isc-0.97:
...
...
src/server/connections.h
View file @
2004279b
/*
* $Id: connections.h,v 0.1
0
1992/0
4
/1
0 11:56:32
ceder Exp $
* $Id: connections.h,v 0.1
1
1992/0
5
/1
8 23:09:19
ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
...
...
@@ -23,7 +23,7 @@
* Please mail bug reports to bug-lyskom@lysator.liu.se.
*/
/*
* $Id: connections.h,v 0.1
0
1992/0
4
/1
0 11:56:32
ceder Exp $
* $Id: connections.h,v 0.1
1
1992/0
5
/1
8 23:09:19
ceder Exp $
*
* connections.h -- The top level of the communication packet.
*
...
...
@@ -44,7 +44,8 @@ typedef struct connection {
struct
connection
*
prev
;
struct
connection
*
next
;
/* The following are used by services.c */
/* The following are used by services.c (which has been split
into many files such as conference.c and person.c). */
Pers_no
pers_no
;
/* 0 if not yet logged in. */
Person
*
person
;
/* NULL if not yet logged in. */
...
...
@@ -53,10 +54,11 @@ typedef struct connection {
Conf_no
cwc
;
/* Current working conference */
String
what_am_i_doing
;
u_char
ena_level
;
/* Enable level */
String
username
;
/*
Userid and hostname
. */
String
username
;
/*
Given userid
. */
String
hostname
;
/* Real hostname */
String
ident_user
;
/* Real username */
Bool
invisible
;
/* Is this session invisible? */
Bool
username_valid
;
/* Set once username is set. */
/* The following are used by server/connections.c */
...
...
src/server/internal-connections.c
View file @
2004279b
/*
* $Id: internal-connections.c,v 0.
9
1992/0
4
/1
0 11:56:34
ceder Exp $
* $Id: internal-connections.c,v 0.
10
1992/0
5
/1
8 23:09:21
ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
...
...
@@ -28,7 +28,7 @@
* Abstract routines on the data type Connection.
*/
static
char
*
rcsid
=
"$Id: internal-connections.c,v 0.
9
1992/0
4
/1
0 11:56:34
ceder Exp $"
;
static
char
*
rcsid
=
"$Id: internal-connections.c,v 0.
10
1992/0
5
/1
8 23:09:21
ceder Exp $"
;
#include
"exp.h"
...
...
@@ -54,7 +54,7 @@ INTERNAL const Connection EMPTY_CONNECTION =
0
,
NULL
,
NO_TIME
,
0
,
EMPTY_STRING_i
,
0
,
EMPTY_STRING_i
,
EMPTY_STRING_i
,
EMPTY_STRING_i
,
FALSE
,
FALSE
,
FALSE
,
/* Used by server/connections.c */
NULL
,
'\0'
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
...
...
@@ -118,6 +118,7 @@ new_client(void)
c
->
username
=
EMPTY_STRING
;
c
->
ident_user
=
EMPTY_STRING
;
c
->
invisible
=
FALSE
;
c
->
username_valid
=
FALSE
;
return
c
;
}
...
...
src/server/prot-a.c
View file @
2004279b
/*
* $Id: prot-a.c,v 0.1
4
1992/0
4/04 17:32:55
ceder Exp $
* $Id: prot-a.c,v 0.1
5
1992/0
5/18 23:09:23
ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
...
...
@@ -26,7 +26,7 @@
* Protocol A.
*/
static
char
*
rcsid
=
"$Id: prot-a.c,v 0.1
4
1992/0
4/04 17:32:55
ceder Exp $"
;
static
char
*
rcsid
=
"$Id: prot-a.c,v 0.1
5
1992/0
5/18 23:09:23
ceder Exp $"
;
#include
<stdio.h>
...
...
@@ -329,7 +329,7 @@ prot_a_is_legal_fnc(Call_header fnc)
void
prot_a_parse_packet
(
Connection
*
client
)
{
if
(
s_empty
(
client
->
username
)
)
if
(
client
->
username
_valid
==
FALSE
)
{
/* Connection not established yet */
...
...
@@ -338,7 +338,8 @@ prot_a_parse_packet(Connection *client)
client
->
username
=
client
->
c_string0
;
/* Kludge to deal with */
client
->
c_string0
=
EMPTY_STRING
;
/* "A5B" as first input. */
/* Protokoll B will not suffer from this... */
client
->
username_valid
=
TRUE
;
mux_printf
(
client
,
"LysKOM
\n
"
);
mux_flush
(
client
);
BUG
((
"[Client %d is logged on]
\n
"
,
client
->
session_no
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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