]> granicus.if.org Git - pdns/commitdiff
make sure speedtest works on solaris too - it needs the virtual alarm to be re-armed...
authorBert Hubert <bert.hubert@netherlabs.nl>
Mon, 19 Jul 2010 14:19:39 +0000 (14:19 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Mon, 19 Jul 2010 14:19:39 +0000 (14:19 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1670 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/speedtest.cc

index 842901fafa415ab15383878dc799586d90fd369c..9010cbee6b4b8fb3d597db0ac2a878ab454448e0 100644 (file)
@@ -26,9 +26,9 @@ template<typename C> void doRun(const C& cmd, int mseconds=100)
   it.it_interval.tv_sec=0;
   it.it_interval.tv_usec=0;
 
+  signal(SIGVTALRM, alarmHandler);
   setitimer(ITIMER_VIRTUAL, &it, 0);
-
-
+  
   unsigned int runs=0;
   g_stop=false;
   DTime dt;
@@ -538,7 +538,7 @@ struct ParsePacketTest
           }
           negindic=true;
         }
-        else if(i->d_place==DNSResourceRecord::ANSWER && iequals(i->qname, qname) && i->qtype.getCode()==QType::CNAME && (!(qtype==QType(QType::CNAME)))) {
+        else if(i->d_place==DNSResourceRecord::ANSWER && pdns_iequals(i->qname, qname) && i->qtype.getCode()==QType::CNAME && (!(qtype==QType(QType::CNAME)))) {
           ret.push_back(*i);
           newtarget=i->content;
         }
@@ -658,7 +658,7 @@ struct IEqualsTest
   void operator()() const
   {
       static string a("www.ds9a.nl"), b("www.lwn.net");
-      bool ret = iequals(a, b);
+      bool ret = boost::iequals(a, b);
   }
 
 };
@@ -713,10 +713,8 @@ int main(int argc, char** argv)
 try
 {
   reportAllTypes();
-  signal(SIGVTALRM, alarmHandler);
-  
   doRun(NOPTest());
-  
+
   doRun(IEqualsTest());
   doRun(MyIEqualsTest());
   doRun(StrcasecmpTest());