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

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Philip Hazel
Data:  
Para: exim-cvs
Asunto: [exim-cvs] cvs commit: exim/exim-doc/doc-txt ChangeLog exim/exim-src/src debug.c
ph10 2005/11/14 10:46:27 GMT

  Modified files:
    exim-doc/doc-txt     ChangeLog 
    exim-src/src         debug.c 
  Log:
  Stop debug+timestamp using the common timestamp buffer, because it can
  interfere with data that's already in there.


  Revision  Changes    Path
  1.255     +5 -0      exim/exim-doc/doc-txt/ChangeLog
  1.4       +8 -3      exim/exim-src/src/debug.c


  Index: ChangeLog
  ===================================================================
  RCS file: /home/cvs/exim/exim-doc/doc-txt/ChangeLog,v
  retrieving revision 1.254
  retrieving revision 1.255
  diff -u -r1.254 -r1.255
  --- ChangeLog    11 Nov 2005 10:02:04 -0000    1.254
  +++ ChangeLog    14 Nov 2005 10:46:27 -0000    1.255
  @@ -1,4 +1,4 @@
  -$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.254 2005/11/11 10:02:04 ph10 Exp $
  +$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.255 2005/11/14 10:46:27 ph10 Exp $


   Change log file for Exim from version 4.21
   -------------------------------------------
  @@ -63,6 +63,11 @@
         However, if the real host name was known, it was omitting the HELO data
         if it matched the actual IP address. This has been tidied up so that it
         doesn't show the same IP address twice.
  +
  +PH/07 When both +timestamp and +memory debugging was on, the value given by
  +      $tod_xxx expansions could be wrong, because the tod_stamp() function was
  +      called by the debug printing, thereby overwriting the timestamp buffer.
  +      Debugging no longer uses the tod_stamp() function when +timestamp is set.



Exim version 4.54

  Index: debug.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/debug.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- debug.c    4 Jan 2005 10:00:42 -0000    1.3
  +++ debug.c    14 Nov 2005 10:46:27 -0000    1.4
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/debug.c,v 1.3 2005/01/04 10:00:42 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/debug.c,v 1.4 2005/11/14 10:46:27 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -161,14 +161,19 @@
   {
   if (debug_file == NULL) return;


-/* Various things can be inserted at the start of a line. */
+/* Various things can be inserted at the start of a line. Don't use the
+tod_stamp() function for the timestamp, because that will overwrite the
+timestamp buffer, which may contain something useful. (This was a bug fix: the
++memory debugging with +timestamp did cause a problem.) */

   if (debug_ptr == debug_buffer)
     {
     DEBUG(D_timestamp)
       {
  -    uschar *ts = tod_stamp(tod_log_bare);
  -    sprintf(CS debug_ptr, "%s ", ts + 11);
  +    time_t now = time(NULL);
  +    struct tm *t = timestamps_utc? gmtime(&now) : localtime(&now);
  +    (void) sprintf(CS debug_ptr, "%02d:%02d:%02d ", t->tm_hour, t->tm_min,
  +      t->tm_sec);
       while(*debug_ptr != 0) debug_ptr++;
       }