Commit 1dd768a2 authored by Per Cederqvist's avatar Per Cederqvist

(async_header): Use isc_putc, isc_putul, prot_a_output_ul and

	isc_flush instead of mux_printf, mux_putc and mux_flush.
(async_trailer): Likewise.
(prot_a_async_new_text_old): Likewise.
(prot_a_async_new_text): Likewise.
(prot_a_async_logout): Likewise.
(prot_a_async_new_name): Likewise.
(prot_a_async_forced_leave_conf): Likewise.
(prot_a_async_login): Likewise.
(prot_a_async_send_message): Likewise.
(prot_a_async_deleted_text): Likewise.
(prot_a_async_new_recipient): Likewise.
(prot_a_async_sub_recipient): Likewise.
(prot_a_async_new_membership): Likewise.
parent a14e41fe
/*
* $Id: prot-a-send-async.c,v 0.21 1998/12/29 10:55:38 byers Exp $
* $Id: prot-a-send-async.c,v 0.22 1999/04/28 22:12:52 ceder Exp $
* Copyright (C) 1991, 1993, 1994, 1995, 1996 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -32,7 +32,7 @@
#endif
static const char *
rcsid = "$Id: prot-a-send-async.c,v 0.21 1998/12/29 10:55:38 byers Exp $";
rcsid = "$Id: prot-a-send-async.c,v 0.22 1999/04/28 22:12:52 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -53,7 +53,6 @@ USE(rcsid);
#include "prot-a-send-async.h"
#include "async.h"
#include "isc-interface.h"
#include "mux.h"
#include "prot-a-output.h"
......@@ -62,8 +61,9 @@ async_header(Connection *fp,
int no_of_tokens,
Async fnc)
{
mux_printf(fp, ":%lu %lu", (unsigned long)no_of_tokens,
(unsigned long)fnc);
isc_putc(':', fp->isc_session);
isc_putul(no_of_tokens, fp->isc_session);
prot_a_output_ul(fp, fnc);
}
......@@ -72,8 +72,8 @@ async_header(Connection *fp,
static void
async_trailer(Connection *fp)
{
mux_putc('\n', fp);
mux_flush(fp);
isc_putc('\n', fp->isc_session);
isc_flush(fp->isc_session);
}
......@@ -84,7 +84,7 @@ prot_a_async_new_text_old(Connection *cptr,
{
ASYNC_CHECK_ACCEPT(cptr, ay_new_text_old);
async_header(cptr, 16, ay_new_text_old);
mux_printf(cptr, " %lu", text_no);
prot_a_output_ul(cptr, text_no);
prot_a_output_text_stat_old(cptr, text_s);
async_trailer(cptr);
}
......@@ -96,7 +96,7 @@ prot_a_async_new_text(Connection *cptr,
{
ASYNC_CHECK_ACCEPT(cptr, ay_new_text);
async_header(cptr, 18, ay_new_text);
mux_printf(cptr, " %lu", text_no);
prot_a_output_ul(cptr, text_no);
prot_a_output_text_stat(cptr, text_s);
async_trailer(cptr);
}
......@@ -119,8 +119,8 @@ prot_a_async_logout(Connection *cptr,
{
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);
prot_a_output_ul(cptr, pers_no);
prot_a_output_ul(cptr, session_no);
async_trailer(cptr);
}
......@@ -132,7 +132,7 @@ prot_a_async_new_name(Connection *cptr,
{
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_ul(cptr, conf_no);
prot_a_output_string(cptr, old_name);
prot_a_output_string(cptr, new_name);
async_trailer(cptr);
......@@ -152,7 +152,7 @@ prot_a_async_forced_leave_conf(Connection *cptr,
{
ASYNC_CHECK_ACCEPT(cptr, ay_leave_conf);
async_header(cptr, 1, ay_leave_conf);
mux_printf(cptr, " %lu", (unsigned long)conf_no);
prot_a_output_ul(cptr, conf_no);
async_trailer(cptr);
}
......@@ -163,8 +163,8 @@ prot_a_async_login(Connection *cptr,
{
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);
prot_a_output_ul(cptr, pers_no);
prot_a_output_ul(cptr, session_no);
async_trailer(cptr);
}
......@@ -184,8 +184,8 @@ prot_a_async_send_message(Connection *cptr,
{
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);
prot_a_output_ul(cptr, recipient);
prot_a_output_ul(cptr, sender);
prot_a_output_string(cptr, message);
async_trailer(cptr);
}
......@@ -197,7 +197,7 @@ prot_a_async_deleted_text(Connection *cptr,
{
ASYNC_CHECK_ACCEPT(cptr, ay_deleted_text);
async_header(cptr, 18, ay_deleted_text);
mux_printf(cptr, " %lu", text_no);
prot_a_output_ul(cptr, text_no);
prot_a_output_text_stat(cptr, text_s);
async_trailer(cptr);
}
......@@ -210,10 +210,9 @@ prot_a_async_new_recipient(Connection *cptr,
{
ASYNC_CHECK_ACCEPT(cptr, ay_new_recipient);
async_header(cptr, 3, ay_new_recipient);
mux_printf(cptr, " %lu %lu %lu",
(unsigned long)text_no,
(unsigned long)conf_no,
(unsigned long)type);
prot_a_output_ul(cptr, text_no);
prot_a_output_ul(cptr, conf_no);
prot_a_output_ul(cptr, type);
async_trailer(cptr);
}
......@@ -225,10 +224,9 @@ prot_a_async_sub_recipient(Connection *cptr,
{
ASYNC_CHECK_ACCEPT(cptr, ay_sub_recipient);
async_header(cptr, 3, ay_sub_recipient);
mux_printf(cptr, " %lu %lu %lu",
(unsigned long)text_no,
(unsigned long)conf_no,
(unsigned long)type);
prot_a_output_ul(cptr, text_no);
prot_a_output_ul(cptr, conf_no);
prot_a_output_ul(cptr, type);
async_trailer(cptr);
}
......@@ -240,8 +238,7 @@ prot_a_async_new_membership(Connection *cptr,
{
ASYNC_CHECK_ACCEPT(cptr, ay_new_membership);
async_header(cptr, 2, ay_new_membership);
mux_printf(cptr, " %lu %lu",
(unsigned long)pers_no,
(unsigned long)conf_no);
prot_a_output_ul(cptr, pers_no);
prot_a_output_ul(cptr, conf_no);
async_trailer(cptr);
}
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