Commit cc8ca2e8 authored by Per Cederqvist's avatar Per Cederqvist

Disconnect idle clients after a few days. (Bug 11).

Fixed a race condition in the test suite.
parent 93d235e8
2003-08-02 Per Cederqvist <ceder@ceder.dyndns.org>
Disconnect idle clients after a few days. (Bug 11).
* doc/lyskomd.texi (Parameters): Document "Connect timeout",
"Login timeout" and "Active timeout".
* src/server/server-config.c (parameters): Added "Connect timeout",
"Login timeout" and "Active timeout".
(require_less): New static function.
(read_configuration): Check that "Stale timeout" is smaller than
the three new timeouts.
* src/server/param.h (struct param): Added connect_timeout,
login_timeout and active_timeout.
* src/server/session.c (login_old): Set the idle timeout to
param.active_timeout.
(login): Ditto.
(logout): Set the idle timeout to param.login_timeout.
* src/server/ramkomd.c (server_init): Set the default idle timeout
to param.connect_timeout.
* src/server/prot-a.c (prot_a_parse_packet): Set the idle timeout
to param.login_timeout once the handshake is done.
* src/server/connections.c (idle_cb): New static function.
(login_request): Pass idle_cb() to isc_set_read_callback().
* src/server/testsuite/lyskomd.0/37.exp: Expect the new timeval
settings: "Connect timeout", "Login timeout" and "Active timeout".
* src/server/testsuite/lyskomd.0/39.exp: New file, with tests for
idle client disconnect.
* src/server/testsuite/lyskomd.0/Makefile.am (EXTRA_DIST): Added
39.exp.
Fixed a race condition in the test suite.
* src/server/testsuite/config/unix.exp (client_start_fail): Don't
add an expect_always handler for eof. In some tests two or more
clients are supposed to die "at once", and this would lead to a
race condition.
(get_time_client_start): Ditto.
Test suite framework improvement.
* src/server/testsuite/config/unix.exp (extracting_expect): Report
the value that was found in the "pass" message. This may help
......
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