diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-03-23 19:09:05 +0300 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-03-23 19:09:05 +0300 |
commit | 143e584d81e18757922706ae67f9fd61e85a10d1 (patch) | |
tree | 92c9f25488391b12f72c6154f341779cc4effea0 | |
parent | e44e925ca55b65388497ff94b02f018a600d5444 (diff) | |
download | rspamd-143e584d81e18757922706ae67f9fd61e85a10d1.tar.gz rspamd-143e584d81e18757922706ae67f9fd61e85a10d1.zip |
Race (func MUST be called after all modifications to its argument)
-rw-r--r-- | src/dns.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -1026,9 +1026,11 @@ dns_timer_cb (gint fd, short what, void *arg) rep->code = DNS_RC_SERVFAIL; upstream_fail (&rep->request->server->up, rep->request->time); remove_normal_event (req->session, dns_fin_cb, req); - req->func (rep, req->arg); dns_check_throttling (req->resolver); req->resolver->errors ++; + + req->func (rep, req->arg); + return; } /* Select other server */ @@ -1092,9 +1094,11 @@ dns_retransmit_handler (gint fd, short what, void *arg) rep->request = req; rep->code = DNS_RC_SERVFAIL; upstream_fail (&rep->request->server->up, rep->request->time); - req->func (rep, req->arg); req->resolver->errors ++; dns_check_throttling (req->resolver); + + req->func (rep, req->arg); + return; } r = send_dns_request (req); |