Commit a14e41fe authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(prot_a_get_token): Use isc_puts and isc_flush instead of mux_printf

	and mux_flush.
(prot_a_parse_num_list): Likewise.
(prot_a_parse_string): Likewise.
parent b5da00ee
/* /*
* $Id: prot-a-parse.c,v 0.35 1998/12/26 22:40:52 byers Exp $ * $Id: prot-a-parse.c,v 0.36 1999/04/28 22:12:08 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.
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#endif #endif
static const char * static const char *
rcsid = "$Id: prot-a-parse.c,v 0.35 1998/12/26 22:40:52 byers Exp $"; rcsid = "$Id: prot-a-parse.c,v 0.36 1999/04/28 22:12:08 ceder Exp $";
#include "rcs.h" #include "rcs.h"
USE(rcsid); USE(rcsid);
...@@ -62,7 +62,6 @@ USE(rcsid); ...@@ -62,7 +62,6 @@ USE(rcsid);
#include "isc-parse.h" #include "isc-parse.h"
#include "kom-config.h" #include "kom-config.h"
#include "isc-interface.h" #include "isc-interface.h"
#include "mux.h"
#include "log.h" #include "log.h"
#include "minmax.h" #include "minmax.h"
#include "param.h" #include "param.h"
...@@ -92,8 +91,8 @@ prot_a_get_token(Connection *client) ...@@ -92,8 +91,8 @@ prot_a_get_token(Connection *client)
{ {
if (client->first_to_parse - old_first > 1000) if (client->first_to_parse - old_first > 1000)
{ {
mux_printf(client, "%%%%Insane token length.\n"); isc_puts("%%Insane token length.\n", client->isc_session);
mux_flush(client); isc_flush(client->isc_session);
longjmp(parse_env, ISC_LOGOUT); longjmp(parse_env, ISC_LOGOUT);
} }
client->first_to_parse = old_first; client->first_to_parse = old_first;
...@@ -145,8 +144,8 @@ prot_a_parse_num_list(Connection *client, ...@@ -145,8 +144,8 @@ prot_a_parse_num_list(Connection *client,
res->length = prot_a_parse_long(client); res->length = prot_a_parse_long(client);
if (res->length < 0) if (res->length < 0)
{ {
mux_printf(client, "%%%%Insane array size.\n"); isc_puts("%%Insane array size.\n", client->isc_session);
mux_flush(client); isc_flush(client->isc_session);
longjmp(parse_env, ISC_LOGOUT); longjmp(parse_env, ISC_LOGOUT);
} }
...@@ -270,9 +269,6 @@ prot_a_parse_conf_type(Connection *client, ...@@ -270,9 +269,6 @@ prot_a_parse_conf_type(Connection *client,
* client sends a longer string only the first 'maxlen+1' characters * client sends a longer string only the first 'maxlen+1' characters
* are read. Any remaining characters are discarded. * are read. Any remaining characters are discarded.
*/ */
/*
* +++ This needs cleaning up. See comments in and above mux_parse_string.
*/
void void
prot_a_parse_string(Connection *client, prot_a_parse_string(Connection *client,
String *result, String *result,
...@@ -313,8 +309,8 @@ prot_a_parse_string(Connection *client, ...@@ -313,8 +309,8 @@ prot_a_parse_string(Connection *client,
if (client_len < 0) if (client_len < 0)
{ {
mux_printf(client, "%%%%Insane string length.\n"); isc_puts("%%Insane string length.\n", client->isc_session);
mux_flush(client); isc_flush(client->isc_session);
BUG(("%%%%Insane string length.\n")); BUG(("%%%%Insane string length.\n"));
longjmp(parse_env, ISC_LOGOUT); longjmp(parse_env, ISC_LOGOUT);
} }
......
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