Revision: 40748
http://brlcad.svn.sourceforge.net/brlcad/?rev=40748&view=rev
Author: davidloman
Date: 2010-09-28 18:14:52 +0000 (Tue, 28 Sep 2010)
Log Message:
-----------
Remove writefds from selector loop completely.
Modified Paths:
--------------
rt^3/trunk/src/libNet/PortalManager.cxx
Modified: rt^3/trunk/src/libNet/PortalManager.cxx
===================================================================
--- rt^3/trunk/src/libNet/PortalManager.cxx 2010-09-28 18:13:19 UTC (rev
40747)
+++ rt^3/trunk/src/libNet/PortalManager.cxx 2010-09-28 18:14:52 UTC (rev
40748)
@@ -58,7 +58,6 @@
void PortalManager::_run() {
struct timeval timeout;
fd_set readfds;
- fd_set writefds;
fd_set exceptionfds;
int listener = -1;
@@ -67,7 +66,6 @@
this->masterFDSLock.unlock();
FD_ZERO(&readfds);
- FD_ZERO(&writefds);
FD_ZERO(&exceptionfds);
if (this->port != 0) {
@@ -96,13 +94,12 @@
this->masterFDSLock.lock();
readfds = masterfds;
- //writefds = masterfds;
exceptionfds = masterfds;
this->masterFDSLock.unlock();
//Shelect!!
int retval = select(fdmax + 1, &readfds, NULL, &exceptionfds,
&timeout);
-
+/*
QString out("Select returned: ");
out.append(QString::number(retval));
out.append(". FD count: ");
@@ -110,7 +107,7 @@
out.append(". MAX FD: ");
out.append(QString::number(fdmax));
this->log->logINFO("PortalManager", out);
-
+*/
//Save time on the loop:
if (retval == 0) {
//continue;
@@ -145,10 +142,10 @@
//Simplify switching later with bools now
bool isListener = (i == listener);
bool readyRead = FD_ISSET(i, &readfds) && !isListener;
- bool readyWrite = FD_ISSET(i, &writefds);
bool readyAccept = FD_ISSET(i, &readfds) && isListener;
bool readyException = FD_ISSET(i, &exceptionfds);
+ /*
QString s("FD:");
s.append(QString::number(i));
@@ -161,15 +158,12 @@
if (readyRead) {
s.append(", readFDS");
}
- if (readyWrite) {
- s.append(", writeFDS");
- }
if (readyException) {
s.append(", exceptionFDS");
}
log->logDEBUG("PortalManager", s);
-
+*/
//If nothing to do, then continue;
if (!readyRead && !readyWrite && !readyAccept &&
!readyException) {
continue;
@@ -243,19 +237,6 @@
continue;
}
}
-
- //write
- if (readyWrite) {
- this->log->logINFO("PortalManager", "Write.");
-
- int retVal = p->flush();
- bu_log("Flushed %d bytes.", retVal);
-
- if (retVal < 0) {
- this->closeFD(i, "Error on write,
dropping connection.");
- continue;
- }
- }
} //end FOR
} //end while
}//end fn
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits