]> granicus.if.org Git - pdns/commitdiff
edit in changes suggested by @rgacogne for TeeAction, thanks
authorbert hubert <bert.hubert@netherlabs.nl>
Mon, 25 Apr 2016 18:02:15 +0000 (20:02 +0200)
committerbert hubert <bert.hubert@netherlabs.nl>
Mon, 25 Apr 2016 18:02:15 +0000 (20:02 +0200)
pdns/dnsdistdist/dnsrulactions.cc
pdns/dnsrulactions.hh

index 852f0281672d6eff7ec5a170f97a2bca5dc55da9..aa40c5a381efca4b59f6bc3ddbdf9b83759fc20e 100644 (file)
@@ -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++;
index a9a4a04075af1e7a5359d877b3f0bb21f9d356f2..25f997d2e5370778e9998177df37f181e023d0f2 100644 (file)
@@ -425,9 +425,9 @@ private:
   void worker();
 
   int d_fd;
-  mutable unsigned long d_senderrors{0};
+  mutable std::atomic<unsigned long> d_senderrors{0};
   unsigned long d_recverrors{0};
-  mutable unsigned long d_queries{0};
+  mutable std::atomic<unsigned long> d_queries{0};
   unsigned long d_responses{0};
   unsigned long d_nxdomains{0};
   unsigned long d_servfails{0};