Loading ...
Sorry, an error occurred while loading the content.

[patch] Minor Solaris fixes for Poller_devpoll

Expand Messages
  • dank@alumni.caltech.edu
    Saubra Gargh sent in a patch fixing a couple minor Solaris compile failures. Still doesn t pass the unit test with /dev/poll, though. It s having trouble
    Message 1 of 1 , Aug 24, 2002
    • 0 Attachment
      Saubra Gargh sent in a patch fixing a couple minor Solaris
      compile failures. Still doesn't pass the unit test with
      /dev/poll, though. It's having trouble removing fd's from the
      interest set...

      I have a Solaris 8 box set up at home, but getting it online is
      a bit of a challenge. I think I've figured out how to mount a floppy...
      damn, but that gui gets in the way...
      - Dan
      ----------

      diff -u dkftpbench-0.45/Poller_devpoll.cc dkftpbench-0.45_new/Poller_devpoll.cc
      --- dkftpbench-0.45/Poller_devpoll.cc Tue Jan 15 22:21:58 2002
      +++ dkftpbench-0.45_new/Poller_devpoll.cc Thu Aug 15 12:47:38 2002
      @@ -27,7 +27,7 @@
      #include <sys/stat.h>
      #include <sys/types.h>
      #include <sys/poll.h>
      -#include <sys/devpoll.h>
      +#include "devpoll.h"
      #include "Poller_devpoll.h"

      #include <errno.h>
      @@ -219,7 +219,7 @@
      return EINVAL;
      }

      - DPRINT(("setMask(%d, %x): new mask %x\n", fd, eventmask, tmp_pfd.events));
      + DPRINT(("setMask(%d, %x): new mask %x\n", fd, eventmask, m_clivents[fd].events));

      return 0;
      }
      @@ -292,7 +292,7 @@
      return EINVAL;
      }

      - DPRINT(("andMask(%d, %x): new mask %x\n", fd, eventmask, tmp_pfd.events));
      + DPRINT(("andMask(%d, %x): new mask %x\n", fd, eventmask, m_clivents[fd].events));

      return 0;
      }
      diff -u dkftpbench-0.45/Poller_test.cc dkftpbench-0.45_new/Poller_test.cc
      --- dkftpbench-0.45/Poller_test.cc Wed Jul 31 07:59:52 2002
      +++ dkftpbench-0.45_new/Poller_test.cc Thu Aug 15 12:07:01 2002
      @@ -35,6 +35,7 @@
      #include <sys/socket.h>
      #include <arpa/inet.h>
      #include <sys/socket.h>
      +#include <signal.h>

      /*----------------------------------------------------------------------
      Portable function to set a socket into nonblocking mode.
      @@ -255,6 +256,12 @@

      DPRINT(("connecting to host %s port %d, expect rejection\n", theHost, thePort));
      CHECK(-1, connect (sock, reinterpret_cast<struct sockaddr *>(&sin), sizeof (sin)));
      + if(errno == ECONNREFUSED) {
      + /* Connection was immediatly rejected
      + */
      + close(sock);
      + return;
      + }
      CHECK(errno, EINPROGRESS);

      /* Don't add the socket to the Poller until after you've


      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.