clamd: update description of ReadTimeout (bb#2565)

remotes/push_mirror/vc9-vt-dnd
Tomasz Kojm 14 years ago
parent ce0c34d14e
commit 27c451d04d
  1. 4
      ChangeLog
  2. 5
      clamd/scanner.c
  3. 2
      docs/man/clamd.8.in
  4. 1
      etc/clamd.conf
  5. 2
      shared/optparser.c

@ -1,3 +1,7 @@
Mon Feb 21 18:19:18 CET 2011 (tk)
---------------------------------
* clamd: update description of ReadTimeout (bb#2565)
Thu Feb 17 19:13:15 CET 2011 (tk)
---------------------------------
* clamd: add new config option BytecodeUnsigned (bb#2537); drop

@ -403,12 +403,7 @@ int scanstream(int odesc, unsigned long int *scanned, const struct cl_engine *en
port += min_port;
timeout = optget(opts, "ReadTimeout")->numarg;
if(timeout == 0)
timeout = -1;
firsttimeout = optget(opts, "CommandReadTimeout")->numarg;
if (firsttimeout == 0)
firsttimeout = -1;
if(!bound && !portscan) {
logg("!ScanStream: Can't find any free port.\n");

@ -66,7 +66,7 @@ Clamd will process the commands asynchronously, and reply as soon as it has fini
Clamd requires clients to read all the replies it sent, before sending more commands to prevent send() deadlocks. The recommended way to implement a client that uses IDSESSION is with non-blocking sockets, and a select()/poll() loop: whenever send would block, sleep in select/poll until either you can write more data, or read more replies.
\fINote that using non-blocking sockets without the select/poll loop and alternating recv()/send() doesn't comply with clamd's requirements.\fR
If clamd detects that a client has deadlocked, it will close the connection. Note that clamd may close an IDSESSION connection too if you don't follow the protocol's requirements.
If clamd detects that a client has deadlocked, it will close the connection. Note that clamd may close an IDSESSION connection too if you don't follow the protocol's requirements. The client can use the PING command to keep the connection alive.
.TP
\fBVERSIONCOMMANDS\fR
It is mandatory to prefix this command with either \fBn\fR or \fBz\fR.

@ -126,7 +126,6 @@ Example
#MaxThreads 20
# Waiting for data from a client socket will timeout after this time (seconds).
# Value of 0 disables the timeout.
# Default: 120
#ReadTimeout 300

@ -220,7 +220,7 @@ const struct clam_option __clam_options[] = {
{ "SendBufTimeout", NULL, 0, TYPE_NUMBER, MATCH_NUMBER, 500, NULL, 0, OPT_CLAMD, "This option specifies how long to wait (in miliseconds) if the send buffer is full. Keep this value low to prevent clamd hanging\n", "200"},
{ "ReadTimeout", NULL, 0, TYPE_NUMBER, MATCH_NUMBER, 120, NULL, 0, OPT_MILTER, "Waiting for data from clamd will timeout after this time (seconds).\nValue of 0 disables the timeout.", "300" },
{ "ReadTimeout", NULL, 0, TYPE_NUMBER, MATCH_NUMBER, 120, NULL, 0, OPT_MILTER, "Waiting for data from clamd will timeout after this time (seconds).", "300" },
{ "MaxQueue", NULL, 0, TYPE_NUMBER, MATCH_NUMBER, 100, NULL, 0, OPT_CLAMD, "Maximum number of queued items (including those being processed by MaxThreads threads)\nIt is recommended to have this value at least twice MaxThreads if possible.\nWARNING: you shouldn't increase this too much to avoid running out of file descriptors,\n the following condition should hold:\n MaxThreads*MaxRecursion + MaxQueue - MaxThreads + 6 < RLIMIT_NOFILE (usual max is 1024)\n", "200" },

Loading…
Cancel
Save