From: bert hubert Date: Mon, 25 Apr 2016 18:02:15 +0000 (+0200) Subject: edit in changes suggested by @rgacogne for TeeAction, thanks X-Git-Tag: rec-4.0.0-alpha3~46^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fa6c1f0ca907fceb0142c4b78562bd782008ab7f;p=pdns edit in changes suggested by @rgacogne for TeeAction, thanks --- diff --git a/pdns/dnsdistdist/dnsrulactions.cc b/pdns/dnsdistdist/dnsrulactions.cc index 852f02816..aa40c5a38 100644 --- a/pdns/dnsdistdist/dnsrulactions.cc +++ b/pdns/dnsdistdist/dnsrulactions.cc @@ -66,7 +66,7 @@ void TeeAction::worker() if(res==0) continue; res=recv(d_fd, packet, sizeof(packet), 0); - if(res <= 0) + if(res <= (int)sizeof(struct dnsheader)) d_recverrors++; else if(res > 0) d_responses++; diff --git a/pdns/dnsrulactions.hh b/pdns/dnsrulactions.hh index a9a4a0407..25f997d2e 100644 --- a/pdns/dnsrulactions.hh +++ b/pdns/dnsrulactions.hh @@ -425,9 +425,9 @@ private: void worker(); int d_fd; - mutable unsigned long d_senderrors{0}; + mutable std::atomic d_senderrors{0}; unsigned long d_recverrors{0}; - mutable unsigned long d_queries{0}; + mutable std::atomic d_queries{0}; unsigned long d_responses{0}; unsigned long d_nxdomains{0}; unsigned long d_servfails{0};