diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2013-03-28 08:58:35 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2013-03-28 08:58:35 +0100 |
commit | db7feaf9883bb0dc419593588036405ef12ebca1 (patch) | |
tree | 1a911fe1a08aed78845e17b5350c9238452a12dd /nxcomp/Agent.h | |
parent | e77bf36d9afbc7e56522574b06217d57c11dd095 (diff) | |
download | nx-libs-db7feaf9883bb0dc419593588036405ef12ebca1.tar.gz nx-libs-db7feaf9883bb0dc419593588036405ef12ebca1.tar.bz2 nx-libs-db7feaf9883bb0dc419593588036405ef12ebca1.zip |
Revert "release 3.5.0.19"
This reverts commit e77bf36d9afbc7e56522574b06217d57c11dd095.
Diffstat (limited to 'nxcomp/Agent.h')
-rw-r--r-- | nxcomp/Agent.h | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/nxcomp/Agent.h b/nxcomp/Agent.h index ded344d84..fac5acd43 100644 --- a/nxcomp/Agent.h +++ b/nxcomp/Agent.h @@ -149,38 +149,30 @@ class Agent int remoteCanRead(const fd_set * const readSet) { - // OS X 10.5 requires the second argument to be non-const, so copy readSet. - // It's safe though, as FD_ISSET does not operate on it. - fd_set readWorkSet = *readSet; - #if defined(TEST) || defined(INFO) *logofs << "Agent: remoteCanRead() is " << - (FD_ISSET(remoteFd_, &readWorkSet) && transport_ -> dequeuable() != 0) - << " with FD_ISSET() " << (int) FD_ISSET(remoteFd_, &readWorkSet) + (FD_ISSET(remoteFd_, readSet) && transport_ -> dequeuable() != 0) + << " with FD_ISSET() " << (int) FD_ISSET(remoteFd_, readSet) << " and dequeuable " << transport_ -> dequeuable() << ".\n" << logofs_flush; #endif - return (FD_ISSET(remoteFd_, &readWorkSet) && + return (FD_ISSET(remoteFd_, readSet) && transport_ -> dequeuable() != 0); } int remoteCanWrite(const fd_set * const writeSet) { - // OS X 10.5 requires the second argument to be non-const, so copy writeSet. - // It's safe though, as FD_ISSET does not operate on it. - fd_set writeWorkSet = *writeSet; - #if defined(TEST) || defined(INFO) *logofs << "Agent: remoteCanWrite() is " << - (FD_ISSET(remoteFd_, &writeWorkSet) && transport_ -> + (FD_ISSET(remoteFd_, writeSet) && transport_ -> queuable() != 0 && canRead_ == 1) << " with FD_ISSET() " - << (int) FD_ISSET(remoteFd_, &writeWorkSet) << " queueable " + << (int) FD_ISSET(remoteFd_, writeSet) << " queueable " << transport_ -> queuable() << " channel can read " << canRead_ << ".\n" << logofs_flush; #endif - return (FD_ISSET(remoteFd_, &writeWorkSet) && + return (FD_ISSET(remoteFd_, writeSet) && transport_ -> queuable() != 0 && canRead_ == 1); } @@ -211,17 +203,13 @@ class Agent int proxyCanRead(const fd_set * const readSet) { - // OS X 10.5 requires the second argument to be non-const, so copy readSet. - // It's safe though, as FD_ISSET does not operate on it. - fd_set readWorkSet = *readSet; - #if defined(TEST) || defined(INFO) *logofs << "Agent: proxyCanRead() is " - << ((int) FD_ISSET(proxy -> getFd(), &readWorkSet) + << ((int) FD_ISSET(proxy -> getFd(), readSet) << ".\n" << logofs_flush; #endif - return (FD_ISSET(proxy -> getFd(), &readWorkSet)); + return (FD_ISSET(proxy -> getFd(), readSet)); } int enqueueData(const char *data, const int size) const |