diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-09-26 17:08:43 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-09-26 17:15:51 +0100 |
commit | 502559ceab99ae36ae0200f98aa2ac14c99b0255 (patch) | |
tree | 1623c2942d05c2bcb85bd63aadd064742e817e31 /src | |
parent | c2cbe8a3fd480360940921970de30c3f5c9f3c10 (diff) | |
download | rspamd-502559ceab99ae36ae0200f98aa2ac14c99b0255.tar.gz rspamd-502559ceab99ae36ae0200f98aa2ac14c99b0255.zip |
[Fix] Do not replan retransmits if merely one server is defined
Diffstat (limited to 'src')
-rw-r--r-- | src/libserver/dns.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libserver/dns.c b/src/libserver/dns.c index 13d1b8309..34b685260 100644 --- a/src/libserver/dns.c +++ b/src/libserver/dns.c @@ -30,12 +30,14 @@ static void rspamd_dns_upstream_ok (struct rdns_upstream_elt *elt, void *ups_data); static void rspamd_dns_upstream_fail (struct rdns_upstream_elt *elt, void *ups_data); +static unsigned int rspamd_dns_upstream_count (void *ups_data); static struct rdns_upstream_context rspamd_ups_ctx = { .select = rspamd_dns_select_upstream, .select_retransmit = rspamd_dns_select_upstream_retransmit, .ok = rspamd_dns_upstream_ok, .fail = rspamd_dns_upstream_fail, + .count = rspamd_dns_upstream_count, .data = NULL }; @@ -340,3 +342,11 @@ rspamd_dns_upstream_fail (struct rdns_upstream_elt *elt, rspamd_upstream_fail (up); } + +static unsigned int +rspamd_dns_upstream_count (void *ups_data) +{ + struct upstream_list *ups = ups_data; + + return rspamd_upstreams_alive (ups); +} |