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

Implemented the disable-client debug call, and use it in a test suite.

Some minor code refactoring.
parent 8f262175
2005-12-18 Per Cederqvist <ceder@moria.cederqvist>
Implemented the disable-client debug call, and use it in a test
suite. Some minor code refactoring.
* src/include/services.h (disable_client): New debug request.
* src/server/fncdef.txt (disable_client): New debug request.
* src/server/connections.h (Connection) [DEBUG_CALLS]: New field:
blocked_by_disable_client.
* src/server/internal-connections.c (init_connection)
[DEBUG_CALLS]: Initialize blocked_by_disable_client.
(new_client): Ditto.
* src/server/connections.c (parse_unparsed) [DEBUG_CALLS]: Don't
process any request if the client is disabled by disable_client.
(may_read_more): New method, extracted from read_from_connection.
Return false if disabled by disable_client.
(should_be_disabled): New method, extracted from
read_from_connection and check_idle_callback. Return true if
disabled by disable_client.
(read_from_connection): Simplified code by using may_read_more and
should_be_disabled.
(check_idle_callback): Simplified code by using should_be_disabled.
(disable_client): New debug request.
* src/server/testsuite/lyskomd.0/51.exp: New test suite. Test that
nothing is read from a disabled client, and that the output queue
fills up properly.
2005-12-12 Per Cederqvist <ceder@ingate.com>
x-face is a broken and historical image format, so don't promote
......
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