Commit 2dc713f2 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(prot_a_reply): Use isc_putc, isc_putul, isc_flush and

	prot_a_output_ul instead of mux_printf, mux_flush and mux_putc.
(prot_a_parse_packet): Likewise.
parent 1dd768a2
/*
* $Id: prot-a.c,v 0.55 1999/02/05 21:49:43 ceder Exp $
* $Id: prot-a.c,v 0.56 1999/04/28 22:13:14 ceder Exp $
* Copyright (C) 1991, 1992, 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.c,v 0.55 1999/02/05 21:49:43 ceder Exp $";
rcsid = "$Id: prot-a.c,v 0.56 1999/04/28 22:13:14 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -55,7 +55,6 @@ USE(rcsid);
#include "connections.h"
#include "debug.h"
#include "isc-interface.h"
#include "mux.h"
#include "kom-errno.h"
#include "server/smalloc.h"
#include "prot-a.h"
......@@ -78,12 +77,14 @@ prot_a_reply(Connection *client,
if ( status == OK )
{
mux_printf(client, "=%d", client->ref_no);
isc_putc('=', client->isc_session);
isc_putul(client->ref_no, client->isc_session);
switch ( fnc_defs[ client->function_index ].result )
{
case rt_number:
mux_printf(client, " %lu", (unsigned long)res->number);
isc_putc(' ', client->isc_session);
isc_putul(res->number, client->isc_session);
BUG(("=%lu\n", res->number));
break;
......@@ -277,17 +278,21 @@ prot_a_reply(Connection *client,
break;
#endif
}
mux_putc('\n', client);
isc_putc('\n', client->isc_session);
}
else
{
/* Failure. Give a reply with the error message. */
mux_printf(client, "%%%u %u %lu\n",
client->ref_no, kom_errno, err_stat);
isc_putc('%', client->isc_session);
isc_putul(client->ref_no, client->isc_session);
prot_a_output_ul(client, kom_errno);
prot_a_output_ul(client, err_stat);
isc_putc('\n', client->isc_session);
BUG(("%%Err %d\n", kom_errno));
}
mux_flush(client);
isc_flush(client->isc_session);
}
......@@ -373,8 +378,8 @@ prot_a_parse_packet(Connection *client)
/* Protokoll B will not suffer from this... */
client->username_valid = TRUE;
mux_printf(client, "LysKOM\n");
mux_flush(client);
isc_puts("LysKOM\n", client->isc_session);
isc_flush(client->isc_session);
BUG(("[Client %lu is logged on]\n", client->session_no));
}
......
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