Commit 9489e589 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(prot_a_parse_packet): Set client->function to illegal_fnc if the

	requested function is not supported instead of raising an
	ISC_PROTOCOL_ERR.
parent eb037c92
/*
* $Id: prot-a.c,v 0.39 1996/07/28 23:40:11 ceder Exp $
* $Id: prot-a.c,v 0.40 1996/08/01 18:32:26 ceder Exp $
* Copyright (C) 1991, 1992, 1993, 1994, 1995 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -26,7 +26,7 @@
* Protocol A.
*/
static char *rcsid = "$Id: prot-a.c,v 0.39 1996/07/28 23:40:11 ceder Exp $";
static char *rcsid = "$Id: prot-a.c,v 0.40 1996/08/01 18:32:26 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -228,12 +228,6 @@ prot_a_reply(Connection *client,
mux_flush(client);
}
/*
* Check if it is a legal function.
*
* BUG: This should be generated from fncdef.txt.
*/
/*
* Set up all data structures that are private to protocol A. This
......@@ -282,6 +276,11 @@ prot_a_destruct(Connection *conn)
}
/*
* Check if it is a legal function.
*
* BUG: This should be generated from fncdef.txt.
*/
static Bool
prot_a_is_legal_fnc(Call_header fnc)
{
......@@ -406,7 +405,7 @@ prot_a_parse_packet(Connection *client)
case 1: /* Get fnc_no */
client->function = (enum call_header)prot_a_parse_long(client);
if ( !prot_a_is_legal_fnc(client->function) )
longjmp(parse_env, ISC_PROTOCOL_ERR);
client->function = illegal_fnc;
client->parse_pos = 2;
/* Fall through */
case 2:
......
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