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. * Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996 Lysator Academic Computer Association.
* *
* This file is part of the LysKOM server. * This file is part of the LysKOM server.
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#endif #endif
static const char * 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" #include "rcs.h"
USE(rcsid); USE(rcsid);
...@@ -55,7 +55,6 @@ USE(rcsid); ...@@ -55,7 +55,6 @@ USE(rcsid);
#include "connections.h" #include "connections.h"
#include "debug.h" #include "debug.h"
#include "isc-interface.h" #include "isc-interface.h"
#include "mux.h"
#include "kom-errno.h" #include "kom-errno.h"
#include "server/smalloc.h" #include "server/smalloc.h"
#include "prot-a.h" #include "prot-a.h"
...@@ -78,12 +77,14 @@ prot_a_reply(Connection *client, ...@@ -78,12 +77,14 @@ prot_a_reply(Connection *client,
if ( status == OK ) 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 ) switch ( fnc_defs[ client->function_index ].result )
{ {
case rt_number: 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)); BUG(("=%lu\n", res->number));
break; break;
...@@ -277,17 +278,21 @@ prot_a_reply(Connection *client, ...@@ -277,17 +278,21 @@ prot_a_reply(Connection *client,
break; break;
#endif #endif
} }
mux_putc('\n', client); isc_putc('\n', client->isc_session);
} }
else else
{ {
/* Failure. Give a reply with the error message. */ /* Failure. Give a reply with the error message. */
mux_printf(client, "%%%u %u %lu\n", isc_putc('%', client->isc_session);
client->ref_no, kom_errno, err_stat); 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)); BUG(("%%Err %d\n", kom_errno));
} }
mux_flush(client); isc_flush(client->isc_session);
} }
...@@ -373,8 +378,8 @@ prot_a_parse_packet(Connection *client) ...@@ -373,8 +378,8 @@ prot_a_parse_packet(Connection *client)
/* Protokoll B will not suffer from this... */ /* Protokoll B will not suffer from this... */
client->username_valid = TRUE; client->username_valid = TRUE;
mux_printf(client, "LysKOM\n"); isc_puts("LysKOM\n", client->isc_session);
mux_flush(client); isc_flush(client->isc_session);
BUG(("[Client %lu is logged on]\n", client->session_no)); 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