]> granicus.if.org Git - pdns/commitdiff
we probably overwrite the errno return from ports_getn now, which might generate...
authorBert Hubert <bert.hubert@netherlabs.nl>
Fri, 5 Mar 2010 13:43:59 +0000 (13:43 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Fri, 5 Mar 2010 13:43:59 +0000 (13:43 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1537 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/portsmplexer.cc

index f79260ac261b7643220c2242e6df7491577a9b39..8d7eb7cb84b05fa1ccba5c5c394453a568443cc0 100644 (file)
@@ -89,7 +89,7 @@ int PortsFDMultiplexer::run(struct timeval* now)
   unsigned int numevents=1;
   int ret= port_getn(d_portfd, d_pevents.get(), min(PORT_MAX_LIST, s_maxevents), &numevents, &timeout);
 
-  gettimeofday(now,0);
+
   
   /* port_getn has an unusual API - (ret == -1, errno == ETIME) can
      mean partial success; you must check (*numevents) in this case
@@ -101,9 +101,10 @@ int PortsFDMultiplexer::run(struct timeval* now)
     if(errno!=EINTR)
       throw FDMultiplexerException("completion port_getn returned error: "+stringerror());
     // EINTR is not really an error
+    gettimeofday(now,0);
     return 0;
   }
-
+  gettimeofday(now,0);
   if(!numevents) // nothing
     return 0;