aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-08-23 11:46:49 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-08-23 11:46:49 +0100
commit4c2e8ff25d1cece2ea8d82e02d8479a3f1372130 (patch)
treef917c83d0564b0857c3db7a960f5f74d129293ef /src
parent1b6b3012ea9e7cac196b56ab46b678bcbe2b056e (diff)
downloadrspamd-4c2e8ff25d1cece2ea8d82e02d8479a3f1372130.tar.gz
rspamd-4c2e8ff25d1cece2ea8d82e02d8479a3f1372130.zip
[Minor] Improve logging on map retries
Diffstat (limited to 'src')
-rw-r--r--src/libserver/maps/map.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/libserver/maps/map.c b/src/libserver/maps/map.c
index c49896829..8b9f522b2 100644
--- a/src/libserver/maps/map.c
+++ b/src/libserver/maps/map.c
@@ -1180,11 +1180,6 @@ rspamd_map_dns_callback (struct rdns_reply *reply, void *arg)
}
if (reply->code == RDNS_RC_NOERROR) {
- /*
- * We just get the first address hoping that a resolver performs
- * round-robin rotation well
- */
-
DL_FOREACH (reply->entries, cur_rep) {
rspamd_inet_addr_t *addr;
addr = rspamd_inet_address_from_rnds (reply->entries);
@@ -1257,11 +1252,12 @@ retry:
idx++;
rspamd_inet_addr_t *prev_addr = cbd->addr;
cbd->addr = (rspamd_inet_addr_t *) g_ptr_array_index (cbd->addrs, idx);
- msg_info_map ("cannot connect to %s to get data for %s: %s, retry with %s",
+ msg_info_map ("cannot connect to %s to get data for %s: %s, retry with %s (%d of %d)",
rspamd_inet_address_to_string_pretty (prev_addr),
cbd->bk->uri,
strerror (errno),
- rspamd_inet_address_to_string_pretty (cbd->addr));
+ rspamd_inet_address_to_string_pretty (cbd->addr),
+ idx + 1, cbd->addrs->len);
goto retry;
}
else {