X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/13c7874e0a41d696ecf55774d62ea7d11778414f..dc6d17694a767a23c5560835303be32a4238b7b3:/src/src/retry.c diff --git a/src/src/retry.c b/src/src/retry.c index 0a2f12656..dc39813fb 100644 --- a/src/src/retry.c +++ b/src/src/retry.c @@ -33,28 +33,27 @@ retry_ultimate_address_timeout(uschar *retry_key, const uschar *domain, dbdata_retry *retry_record, time_t now) { BOOL address_timeout; +retry_config * retry; DEBUG(D_retry) { debug_printf("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)retry_record->first_failed, - (int)retry_record->next_try, retry_record->expired); + debug_printf(" now=" TIME_T_FMT " first_failed=" TIME_T_FMT + " next_try=" TIME_T_FMT " expired=%c\n", + now, retry_record->first_failed, + retry_record->next_try, retry_record->expired ? 'T' : 'F'); } -retry_config *retry = - retry_find_config(retry_key+2, domain, +retry = retry_find_config(retry_key+2, domain, retry_record->basic_errno, retry_record->more_errno); -if (retry != NULL && retry->rules != NULL) +if (retry && retry->rules) { retry_rule *last_rule; - for (last_rule = retry->rules; - last_rule->next != NULL; - last_rule = last_rule->next); + for (last_rule = retry->rules; last_rule->next; last_rule = last_rule->next) ; DEBUG(D_retry) - debug_printf(" received_time=%d diff=%d timeout=%d\n", - (int)received_time.tv_sec, (int)(now - received_time.tv_sec), last_rule->timeout); + debug_printf(" received_time=" TIME_T_FMT " diff=%d timeout=%d\n", + received_time.tv_sec, (int)(now - received_time.tv_sec), last_rule->timeout); address_timeout = (now - received_time.tv_sec > last_rule->timeout); } else @@ -524,7 +523,6 @@ retry_update(address_item **addr_defer, address_item **addr_failed, open_db dbblock; open_db *dbm_file = NULL; time_t now = time(NULL); -int i; DEBUG(D_retry) debug_printf("Processing retry items\n"); @@ -532,7 +530,7 @@ DEBUG(D_retry) debug_printf("Processing retry items\n"); Deferred addresses must be handled after failed ones, because some may be moved to the failed chain if they have timed out. */ -for (i = 0; i < 3; i++) +for (int i = 0; i < 3; i++) { address_item *endaddr, *addr; address_item *last_first = NULL; @@ -556,7 +554,6 @@ for (i = 0; i < 3; i++) while ((endaddr = *paddr)) { BOOL timed_out = FALSE; - retry_item *rti; for (addr = endaddr; addr; addr = addr->parent) { @@ -568,7 +565,7 @@ for (i = 0; i < 3; i++) /* Loop for each retry item. */ - for (rti = addr->retries; rti; rti = rti->next) + for (retry_item * rti = addr->retries; rti; rti = rti->next) { uschar *message; int message_length, message_space, failing_interval, next_try;