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
ee083b66
Commit
ee083b66
authored
Jun 14, 1996
by
David Byers
Browse files
All functions: check the connection's want_async array before sending messages
parent
358dfaa8
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/server/prot-a-send-async.c
View file @
ee083b66
/*
* $Id: prot-a-send-async.c,v 0.1
2
199
5
/0
1/01 20:17:25 ced
er Exp $
* $Id: prot-a-send-async.c,v 0.1
3
199
6
/0
6/14 15:54:43 by
er
s
Exp $
* Copyright (C) 1991, 1993, 1994, 1995 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
...
...
@@ -26,7 +26,7 @@
* Asynchronous messages in protocol A.
*/
static
char
*
rcsid
=
"$Id: prot-a-send-async.c,v 0.1
2
199
5
/0
1/01 20:17:25 ced
er Exp $"
;
static
char
*
rcsid
=
"$Id: prot-a-send-async.c,v 0.1
3
199
6
/0
6/14 15:54:43 by
er
s
Exp $"
;
#include
"rcs.h"
USE
(
rcsid
);
...
...
@@ -49,6 +49,7 @@ USE(rcsid);
#include
"mux.h"
#include
"prot-a-output.h"
static
void
async_header
(
Connection
*
fp
,
int
no_of_tokens
,
...
...
@@ -74,6 +75,7 @@ prot_a_async_new_text(Connection *cptr,
Text_no
text_no
,
Text_stat
*
text_s
)
{
ASYNC_CHECK_ACCEPT
(
cptr
,
ay_new_text
);
async_header
(
cptr
,
16
,
ay_new_text
);
mux_printf
(
cptr
,
" %lu"
,
text_no
);
prot_a_output_text_stat
(
cptr
,
text_s
);
...
...
@@ -85,6 +87,7 @@ void
prot_a_async_i_am_on
(
Connection
*
cptr
,
Who_info
info
)
{
ASYNC_CHECK_ACCEPT
(
cptr
,
ay_i_am_on
);
async_header
(
cptr
,
5
,
ay_i_am_on
);
prot_a_output_who_info
(
cptr
,
&
info
);
async_trailer
(
cptr
);
...
...
@@ -95,6 +98,7 @@ prot_a_async_logout(Connection *cptr,
Pers_no
pers_no
,
Session_no
session_no
)
{
ASYNC_CHECK_ACCEPT
(
cptr
,
ay_logout
);
async_header
(
cptr
,
2
,
ay_logout
);
mux_printf
(
cptr
,
" %lu %lu"
,
(
unsigned
long
)
pers_no
,
(
unsigned
long
)
session_no
);
...
...
@@ -107,6 +111,7 @@ prot_a_async_new_name(Connection *cptr,
String
old_name
,
String
new_name
)
{
ASYNC_CHECK_ACCEPT
(
cptr
,
ay_new_name
);
async_header
(
cptr
,
3
,
ay_new_name
);
mux_printf
(
cptr
,
" %lu"
,
(
unsigned
long
)
conf_no
);
prot_a_output_string
(
cptr
,
old_name
);
...
...
@@ -117,6 +122,7 @@ prot_a_async_new_name(Connection *cptr,
void
prot_a_async_sync_db
(
Connection
*
cptr
)
{
ASYNC_CHECK_ACCEPT
(
cptr
,
ay_sync_db
);
async_header
(
cptr
,
0
,
ay_sync_db
);
async_trailer
(
cptr
);
}
...
...
@@ -125,6 +131,7 @@ void
prot_a_async_forced_leave_conf
(
Connection
*
cptr
,
Conf_no
conf_no
)
{
ASYNC_CHECK_ACCEPT
(
cptr
,
ay_leave_conf
);
async_header
(
cptr
,
1
,
ay_leave_conf
);
mux_printf
(
cptr
,
" %lu"
,
(
unsigned
long
)
conf_no
);
async_trailer
(
cptr
);
...
...
@@ -135,6 +142,7 @@ prot_a_async_login(Connection *cptr,
Pers_no
pers_no
,
int
session_no
)
{
ASYNC_CHECK_ACCEPT
(
cptr
,
ay_login
);
async_header
(
cptr
,
2
,
ay_login
);
mux_printf
(
cptr
,
" %lu %lu"
,
(
unsigned
long
)
pers_no
,
(
unsigned
long
)
session_no
);
...
...
@@ -144,6 +152,7 @@ prot_a_async_login(Connection *cptr,
void
prot_a_async_rejected_connection
(
Connection
*
cptr
)
{
ASYNC_CHECK_ACCEPT
(
cptr
,
ay_rejected_connection
);
async_header
(
cptr
,
0
,
ay_rejected_connection
);
async_trailer
(
cptr
);
}
...
...
@@ -154,6 +163,7 @@ prot_a_async_send_message(Connection *cptr,
Pers_no
sender
,
String
message
)
{
ASYNC_CHECK_ACCEPT
(
cptr
,
ay_send_message
);
async_header
(
cptr
,
3
,
ay_send_message
);
mux_printf
(
cptr
,
" %lu %lu"
,
(
unsigned
long
)
recipient
,
(
unsigned
long
)
sender
);
...
...
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