Commit fe84221e authored by Per Cederqvist's avatar Per Cederqvist

Disconnect stale clients. Moved setup_timer() to libmisc.

parent 0985835d
2003-08-01 Per Cederqvist <ceder@ceder.dyndns.org>
Disconnect stale clients.
* doc/lyskomd.texi (Parameters): Document "Stale timeout".
* src/server/server-config.c (parameters): Added "Stale timeout".
* src/server/ramkomd.c (server_init): Configure the stale timeout
of ISC.
* src/server/param.h (struct kom_par): Added stale_timeout.
* src/server/connections.c (stale_cb): New static function.
(login_request): Pass stale_cb to isc_set_read_callback().
(setup_timer): Moved to timeval-util.h, and added a return value.
All callers updated to check it.
* src/server/testsuite/lyskomd.0/38.exp: Set the "Stale timeout"
to 10 seconds, so that we can test disconnection of a stalled
client in a reasonable time. Don't expect that test to fail.
* src/server/testsuite/get-time-often.c (abort_pending): New
static variable.
(do_write_only): Now global static, not a local variable in main.
(setup_timer): Removed. Use the one from libmisc instead.
(write_server): Handle ECONNRESET, EPIPE and end-of-file when only
writing.
(arm_timer): Check return value of setup_timer.
(end_it): Clear abort_pending.
(main): Set abort_pending if we are about to abort. Cancel the
timer if the top loop returns before the abort timer fires.
Treat ECONNRESET the same way as EPIPE.
Moved setup_timer() to libmisc.
* src/server/connections.h: (setup_timer): Moved to
timeval-util.h, and added a return value. All callers updated to
check it.
* src/libraries/libmisc/timeval-util.h,
src/libraries/libmisc/timeval-util.c (setup_timer): New function.
* src/libraries/libmisc/Makefile.am (AM_CPPFLAGS): Search liboop.
* src/server/text-garb.c (garb_callback): Check return value of
setup_timer.
2003-07-31 Per Cederqvist <ceder@ceder.dyndns.org>
Xenofarm tweak for asmodean.
......
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