Commit 459e73e5 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Handle scheduling of different weights. The scheduling priority must

still be 0.
parent 187743c4
2003-08-15 Per Cederqvist <ceder@ceder.dyndns.org>
Handle scheduling of different weights. The scheduling priority
must still be 0.
* doc/lyskomd.texi (Parameters): Document "Default priority", "Max
priority", "Default weight" and "Max weight".
* src/server/connections.h (Connection): New field: schedule.
* src/server/server-config.c (parameters): Added "Default
priority", "Max priority", "Default weight" and "Max weight".
(require_less_eq): New static function.
(read_configuration): Check the new parameters. For now,
max_priority must be set to 0, since connections.c can only handle
a single priority.
* src/server/param.h (struct kom_par): New fields:
default_priority, max_priority, default_weight, max_weight.
* src/server/internal-connections.c (init_connection): Initialize
the schedule.
* src/server/connections.c (login_request): Set the priority and
weight from param.default_priority and param.default_weight.
(adjust_penalty): Use the weight to reduce the penalty.
(get_scheduling): Return the actual scheduling information from
the connection.
(set_scheduling): Check the priority and weight against
param.max_priority and param.max_weight. Allow the user to change
them, as long as it is done within those limits. Store the new
values in the connection. Note: the current implementation cannot
handle more than one priority. The check for that is made in
server-config.c.
* src/server/testsuite/get-time-often.c (longopts): Added
--priority and --weight.
(main): Handle the new options.
* src/server/testsuite/lyskomd.0/01.exp: The new default weight is
20. The new maximum weight is 100.
* src/server/testsuite/lyskomd.0/03.exp: Ditto.
2003-08-14 Per Cederqvist <ceder@ceder.dyndns.org>
Added the set-scheduling and get-scheduling requests. The current
......
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