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

(read_configuration): Increase param.max_text and param.max_conf.

	This fixes an off-by-one error in the documentation and
	parameter naming.
parent 5692e11b
/*
* $Id: server-config.c,v 0.82 2002/11/15 17:14:36 ceder Exp $
* $Id: server-config.c,v 0.83 2003/01/04 21:04:28 ceder Exp $
* Copyright (C) 1991-1999, 2001-2002 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -555,6 +555,22 @@ read_configuration(const char *conf_file)
param_name(&param.saved_items_per_call));
}
/* We want max_texts and max_confs to hold the first forbidden
number, but the documentation states that they hold the number
of objects that are allowed to be created. Adjust. */
if (++param.max_text < 2)
{
err = TRUE;
kom_log("Parameter '%s' must be at least 1.\n",
param_name(&param.max_text));
}
if (++param.max_conf < 6)
{
err = TRUE;
kom_log("Parameter '%s' must be at least 5.\n",
param_name(&param.max_conf));
}
/* FIXME (bug 165): Check config parameters for sanity.
One thing to check is:
The following should always be true:
......
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