[exim-cvs] cvs commit: exim/exim-src/src acl.c

Góra strony
Delete this message
Reply to this message
Autor: Philip Hazel
Data:  
Dla: exim-cvs
Temat: [exim-cvs] cvs commit: exim/exim-src/src acl.c
ph10 2005/05/11 10:26:55 BST

  Modified files:
    exim-src/src         acl.c 
  Log:
  Added a long comment to acl.c about the problem of detecting a client
  going away during a "delay" wait.


  Revision  Changes    Path
  1.30      +16 -0     exim/exim-src/src/acl.c


  Index: acl.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/acl.c,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- acl.c    10 May 2005 10:19:11 -0000    1.29
  +++ acl.c    11 May 2005 09:26:55 -0000    1.30
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/acl.c,v 1.29 2005/05/10 10:19:11 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/acl.c,v 1.30 2005/05/11 09:26:55 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -2178,6 +2178,22 @@
             HDEBUG(D_acl)
               debug_printf("delay skipped in -bh checking mode\n");
             }
  +
  +        /* It appears to be impossible to detect that a TCP/IP connection has
  +        gone away without reading from it. This means that we cannot shorten
  +        the delay below if the client goes away, because we cannot discover
  +        that the client has closed its end of the connection. (The connection
  +        is actually in a half-closed state, waiting for the server to close its
  +        end.) It would be nice to be able to detect this state, so that the
  +        Exim process is not held up unnecessarily. However, it seems that we
  +        can't. The poll() function does not do the right thing, and in any case
  +        it is not always available.
  +
  +        NOTE: If ever this state of affairs changes, remember that we may be
  +        dealing with stdin/stdout here, in addition to TCP/IP connections.
  +        Whatever is done must work in both cases. To detected the stdin/stdout
  +        case, check for smtp_in or smtp_out being NULL. */
  +
           else
             {
             while (delay > 0) delay = sleep(delay);