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

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Philip Hazel
Dátum:  
Címzett: exim-cvs
Tárgy: [exim-cvs] cvs commit: exim/exim-src/src daemon.c exim.c
ph10 2007/01/17 11:29:39 GMT

  Modified files:
    exim-src/src         daemon.c exim.c 
  Log:
  Add comments as to why smtp_log_no_mail() is not called when
  smtp_start_session() fails - and arrange not to do so in the -bh case.


  Revision  Changes    Path
  1.21      +6 -1      exim/exim-src/src/daemon.c
  1.53      +12 -2     exim/exim-src/src/exim.c


  Index: daemon.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/daemon.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- daemon.c    15 Jan 2007 15:59:22 -0000    1.20
  +++ daemon.c    17 Jan 2007 11:29:39 -0000    1.21
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/daemon.c,v 1.20 2007/01/15 15:59:22 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/daemon.c,v 1.21 2007/01/17 11:29:39 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -468,7 +468,12 @@
     /* Handle the start of the SMTP session, then loop, accepting incoming
     messages from the SMTP connection. The end will come at the QUIT command,
     when smtp_setup_msg() returns 0. A break in the connection causes the
  -  process to die (see accept.c). */
  +  process to die (see accept.c).
  +
  +  NOTE: We do *not* call smtp_log_no_mail() if smtp_start_session() fails,
  +  because a log line has already been written for all its failure exists
  +  (usually "connection refused: <reason>") and writing another one is
  +  unnecessary clutter. */


     if (!smtp_start_session())
       {


  Index: exim.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/exim.c,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- exim.c    15 Jan 2007 15:59:22 -0000    1.52
  +++ exim.c    17 Jan 2007 11:29:39 -0000    1.53
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/exim.c,v 1.52 2007/01/15 15:59:22 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/exim.c,v 1.53 2007/01/17 11:29:39 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -4371,6 +4371,11 @@
       log_write_selector &= ~L_smtp_connection;
     log_write(L_smtp_connection, LOG_MAIN, "%s", smtp_get_connection_info());


  +  /* NOTE: We do *not* call smtp_log_no_mail() if smtp_start_session() fails,
  +  because a log line has already been written for all its failure exists
  +  (usually "connection refused: <reason>") and writing another one is
  +  unnecessary clutter. */
  +
     if (smtp_start_session())
       {
       reset_point = store_get(0);
  @@ -4380,8 +4385,8 @@
         if (smtp_setup_msg() <= 0) break;
         if (!receive_msg(FALSE)) break;
         }
  +    smtp_log_no_mail();
       }
  -  smtp_log_no_mail();
     exim_exit(EXIT_SUCCESS);
     }


  @@ -4519,7 +4524,12 @@
     }


/* If this is smtp input of any kind, handle the start of the SMTP
-session. */
+session.
+
+NOTE: We do *not* call smtp_log_no_mail() if smtp_start_session() fails,
+because a log line has already been written for all its failure exists
+(usually "connection refused: <reason>") and writing another one is
+unnecessary clutter. */

   if (smtp_input)
     {