More debugging information given for retry time not reached.
authorPhilip Hazel <ph10@hermes.cam.ac.uk>
Mon, 3 Jul 2006 15:39:06 +0000 (15:39 +0000)
committerPhilip Hazel <ph10@hermes.cam.ac.uk>
Mon, 3 Jul 2006 15:39:06 +0000 (15:39 +0000)
doc/doc-txt/ChangeLog
src/src/retry.c
test/runtest
test/stderr/0476

index 869a9c270af86fe074bb53ed0d465a035b7f74c6..33844879d9cde4fd2894313ff2b5c4379b9dce90 100644 (file)
@@ -1,4 +1,4 @@
-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.366 2006/07/03 15:19:44 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.367 2006/07/03 15:39:06 ph10 Exp $
 
 Change log file for Exim from version 4.21
 -------------------------------------------
@@ -70,6 +70,8 @@ PH/08 When testing addresses using -bt, indicate those final addresses that
 PH/09 Applied patch from Erik to use select() instead of poll() in spam.c on
       systems where poll() doesn't work, in particular OS X.
 
+PH/10 Added more information to debugging output for retry time not reached.
+
 
 Exim version 4.62
 -----------------
index afb40ef9078101284f3f65f53eeb3874c7b5a6e9..ae1c471dbc44097263906a3f85bff9abe1b5a152 100644 (file)
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/retry.c,v 1.10 2006/04/20 10:57:46 ph10 Exp $ */
+/* $Cambridge: exim/src/src/retry.c,v 1.11 2006/07/03 15:39:06 ph10 Exp $ */
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
@@ -47,9 +47,8 @@ if (retry != NULL && retry->rules != NULL)
        last_rule->next != NULL;
        last_rule = last_rule->next);
   DEBUG(D_transport|D_retry)
-    debug_printf("now=%d received_time=%d diff=%d timeout=%d\n",
-      (int)now, received_time, (int)(now - received_time),
-      last_rule->timeout);
+    debug_printf("  received_time=%d diff=%d timeout=%d\n",
+      received_time, (int)(now - received_time), last_rule->timeout);
   address_timeout = (now - received_time > last_rule->timeout);
   }
 else
@@ -210,8 +209,14 @@ if (host_retry_record != NULL)
   if (now < host_retry_record->next_try && !deliver_force)
     {
     DEBUG(D_transport|D_retry)
+      {
       debug_printf("host retry time not reached: checking ultimate address "
         "timeout\n");
+      debug_printf("  now=%d first_failed=%d next_try=%d expired=%d\n",
+        (int)now, (int)host_retry_record->first_failed,
+        (int)host_retry_record->next_try,
+        host_retry_record->expired);
+      }
 
     if (!host_retry_record->expired &&
         ultimate_address_timeout(host_key, domain,
@@ -247,8 +252,13 @@ if (message_retry_record != NULL)
   if (now < message_retry_record->next_try && !deliver_force)
     {
     DEBUG(D_transport|D_retry)
+      {
       debug_printf("host+message retry time not reached: checking ultimate "
         "address timeout\n");
+      debug_printf("  now=%d first_failed=%d next_try=%d expired=%d\n",
+        (int)now, (int)message_retry_record->first_failed,
+        (int)message_retry_record->next_try, message_retry_record->expired);
+      }
     if (!ultimate_address_timeout(host_key, domain, 0, 0, now))
       {
       host->status = hstatus_unusable;
index 397ea474d49bf72aaade097c2feebd5838548491..9d84232ff8e680a1c8798f5dfebbeebc526b76c8 100755 (executable)
@@ -1,6 +1,6 @@
 #! /usr/bin/perl -w
 
-# $Cambridge: exim/test/runtest,v 1.10 2006/04/28 13:46:36 ph10 Exp $
+# $Cambridge: exim/test/runtest,v 1.11 2006/07/03 15:39:06 ph10 Exp $
 
 ###############################################################################
 # This is the controlling script for the "new" test suite for Exim. It should #
@@ -413,7 +413,8 @@ while(<IN>)
     my($next) = $3 - $2;
     $_ = "  first failed=dddd last try=dddd next try=+$next $4\n";
     }
-  s/^now=\d+ received_time=\d+ diff=\d+ timeout=(\d+)/now=tttt received_time=tttt diff=tttt timeout=$1/;
+  s/^(\s*)now=\d+ first_failed=\d+ next_try=\d+ expired=(\d)/$1now=tttt first_failed=tttt next_try=tttt expired=$2/;
+  s/^(\s*)received_time=\d+ diff=\d+ timeout=(\d+)/$1now=tttt received_time=tttt diff=tttt timeout=$2/;
 
   # Time to retry may vary
   s/time to retry = \S+/time to retry = tttt/;
index 5369e437b541990265f3f1baf3717251bf079454..01251066f1e3f9570f544b43f687de666200b4a5 100644 (file)
@@ -96,7 +96,8 @@ t1 transport entered
 checking status of 127.0.0.1
 no message retry record
 host retry time not reached: checking ultimate address timeout
-now=tttt received_time=tttt diff=tttt timeout=86400
+  now=tttt first_failed=tttt next_try=tttt expired=0
+  now=tttt received_time=tttt diff=tttt timeout=86400
 127.0.0.1 [127.0.0.1]:1111 status = unusable
 all IP addresses skipped or deferred at least one address
 Leaving t1 transport