From: bert hubert Date: Mon, 17 Mar 2014 14:18:14 +0000 (+0100) Subject: fix up whitespace plus pdns-distributes-queries efficiency error handling X-Git-Tag: rec-3.6.0-rc1~131 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2f22827a2c4e84f7afefedbba8321977242740d6;p=thirdparty%2Fpdns.git fix up whitespace plus pdns-distributes-queries efficiency error handling --- diff --git a/pdns/dnsreplay.cc b/pdns/dnsreplay.cc index a4a64fc60f..3c2daa57cf 100644 --- a/pdns/dnsreplay.cc +++ b/pdns/dnsreplay.cc @@ -99,8 +99,6 @@ const struct timeval operator*(float fact, const struct timeval& rhs) } - - class DNSIDManager : public boost::noncopyable { public: @@ -108,7 +106,6 @@ public: { for(unsigned int i=0; i < 65536; ++i) d_available.push_back(i); - } uint16_t peakID() @@ -166,8 +163,6 @@ typedef multi_index_container< > qids_t; qids_t qids; - - bool g_throttled; unsigned int s_questions, s_origanswers, s_weanswers, s_wetimedout, s_perfect, s_mostly, s_origtimedout; @@ -176,7 +171,6 @@ unsigned int s_webetter, s_origbetter, s_norecursionavailable; unsigned int s_weunmatched, s_origunmatched; unsigned int s_wednserrors, s_origdnserrors, s_duplicates; - double DiffTime(const struct timeval& first, const struct timeval& second) { int seconds=second.tv_sec - first.tv_sec; @@ -374,16 +368,15 @@ try s_wednserrors++; } } - } catch(std::exception& e) { - cerr<<"Receiver thread died: "<func(); + void *resp=0; + try { + resp = tmsg->func(); + } + catch(std::exception& e) { + L<wantAnswer) if(write(g_pipes[t_id].writeFromThread, &resp, sizeof(resp)) != sizeof(resp)) unixDie("write to thread pipe returned wrong size or error");