]> granicus.if.org Git - pdns/commitdiff
work around solaris 10 bug, see https://issues.apache.org/bugzilla/show_bug.cgi?id...
authorBert Hubert <bert.hubert@netherlabs.nl>
Fri, 28 May 2010 12:45:47 +0000 (12:45 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Fri, 28 May 2010 12:45:47 +0000 (12:45 +0000)
Reported by "dirk" and AS. No thanks to sun. Solution suggested by Apache folks, thanks!

git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1622 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/portsmplexer.cc

index 8d7eb7cb84b05fa1ccba5c5c394453a568443cc0..623ce88cb9b5c2c25fe7639c4d8559bf99713297 100644 (file)
@@ -88,8 +88,6 @@ int PortsFDMultiplexer::run(struct timeval* now)
   timeout.tv_sec=0; timeout.tv_nsec=500000000;
   unsigned int numevents=1;
   int ret= port_getn(d_portfd, d_pevents.get(), min(PORT_MAX_LIST, s_maxevents), &numevents, &timeout);
-
-
   
   /* port_getn has an unusual API - (ret == -1, errno == ETIME) can
      mean partial success; you must check (*numevents) in this case
@@ -97,7 +95,7 @@ int PortsFDMultiplexer::run(struct timeval* now)
      events from that object again. We don't care about pure timeouts
      (ret == -1, errno == ETIME, *numevents == 0) so we don't bother
      with that case. */
-  if(ret < 0 && errno!=ETIME) {
+  if(ret == -1 && errno!=ETIME) {
     if(errno!=EINTR)
       throw FDMultiplexerException("completion port_getn returned error: "+stringerror());
     // EINTR is not really an error