[exim-cvs] cvs commit: exim/exim-doc/doc-txt ChangeLog exim…

Página Inicial
Delete this message
Reply to this message
Autor: Philip Hazel
Data:  
Para: exim-cvs
Assunto: [exim-cvs] cvs commit: exim/exim-doc/doc-txt ChangeLog exim/exim-src/src/transports pipe.c
ph10 2005/05/10 12:13:09 BST

  Modified files:
    exim-doc/doc-txt     ChangeLog 
    exim-src/src/transports pipe.c 
  Log:
  1. Preserve underlying transport filter timeout message if a pipe
  command ends in failure.


  Revision  Changes    Path
  1.135     +5 -0      exim/exim-doc/doc-txt/ChangeLog
  1.6       +16 -6     exim/exim-src/src/transports/pipe.c


  Index: ChangeLog
  ===================================================================
  RCS file: /home/cvs/exim/exim-doc/doc-txt/ChangeLog,v
  retrieving revision 1.134
  retrieving revision 1.135
  diff -u -r1.134 -r1.135
  --- ChangeLog    10 May 2005 10:19:11 -0000    1.134
  +++ ChangeLog    10 May 2005 11:13:09 -0000    1.135
  @@ -1,4 +1,4 @@
  -$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.134 2005/05/10 10:19:11 ph10 Exp $
  +$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.135 2005/05/10 11:13:09 ph10 Exp $


Change log file for Exim from version 4.21
-------------------------------------------
@@ -8,6 +8,11 @@
-----------------

   TF/01 Added support for Client SMTP Authorization. See NewStuff for details.
  +
  +PH/01 When a transport filter timed out in a pipe delivery, and the pipe
  +      command itself ended in error, the underlying message about the transport
  +      filter timeout was being overwritten with the pipe command error. Now the
  +      underlying error message should be appended to the second error message.



Exim version 4.51

  Index: pipe.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/transports/pipe.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- pipe.c    3 May 2005 14:20:01 -0000    1.5
  +++ pipe.c    10 May 2005 11:13:09 -0000    1.6
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/transports/pipe.c,v 1.5 2005/05/03 14:20:01 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/transports/pipe.c,v 1.6 2005/05/10 11:13:09 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -830,6 +830,9 @@


   if ((rc = child_close(pid, timeout)) != 0)
     {
  +  uschar *tmsg = (addr->message == NULL)? US"" :
  +    string_sprintf(" (preceded by %s)", addr->message);
  +
     /* The process did not complete in time; kill its process group and fail
     the delivery. It appears to be necessary to kill the output process too, as
     otherwise it hangs on for some time if the actual pipe process is sleeping.
  @@ -841,7 +844,7 @@
       killpg(pid, SIGKILL);
       kill(outpid, SIGKILL);
       addr->transport_return = ob->timeout_defer? DEFER : FAIL;
  -    addr->message = string_sprintf("pipe delivery process timed out");
  +    addr->message = string_sprintf("pipe delivery process timed out%s", tmsg);
       }


     /* Wait() failed. */
  @@ -850,7 +853,7 @@
       {
       addr->transport_return = PANIC;
       addr->message = string_sprintf("Wait() failed for child process of %s "
  -      "transport: %s", tblock->name, strerror(errno));
  +      "transport: %s%s", tblock->name, strerror(errno), tmsg);
       }


     /* Either the process completed, but yielded a non-zero (necessarily
  @@ -864,8 +867,8 @@
         {
         addr->transport_return = FAIL;
         addr->message = string_sprintf("Child process of %s transport (running "
  -        "command \"%s\") was terminated by signal %d (%s)", tblock->name, cmd,
  -        -rc, os_strsignal(-rc));
  +        "command \"%s\") was terminated by signal %d (%s)%s", tblock->name, cmd,
  +        -rc, os_strsignal(-rc), tmsg);
         }
       }


  @@ -917,8 +920,8 @@
         {
         addr->transport_return = DEFER;
         addr->special_action = SPECIAL_FREEZE;
  -      addr->message = string_sprintf("pipe process failed to exec \"%s\"",
  -        cmd);
  +      addr->message = string_sprintf("pipe process failed to exec \"%s\"%s",
  +        cmd, tmsg);
         }


       /* Otherwise take action only if not ignoring status */
  @@ -992,6 +995,13 @@
           if (quote)
             addr->message = string_cat(addr->message, &size, &ptr, US"\"", 1);
           }
  +
  +      /* Add previous filter timeout message, if present. */
  +
  +      if (*tmsg != 0)
  +        addr->message = string_cat(addr->message, &size, &ptr, tmsg,
  +          Ustrlen(tmsg));
  +
         addr->message[ptr] = 0;  /* Ensure concatenated string terminated */
         }
       }