Revision: 41617
http://brlcad.svn.sourceforge.net/brlcad/?rev=41617&view=rev
Author: davidloman
Date: 2010-12-15 17:04:43 +0000 (Wed, 15 Dec 2010)
Log Message:
-----------
Simplify selector loop timeout time calc a bit. Un-hotwire the readyRead bool
value. The underlying read issue is fixed.
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-12-15 16:08:35 UTC (rev
41616)
+++ rt^3/trunk/src/libNet/PortalManager.cxx 2010-12-15 17:04:43 UTC (rev
41617)
@@ -101,7 +101,7 @@
while (this->runCmd) {
/* Set values EVERY loop since select() on *nix modifies this.
*/
timeout.tv_sec = 0;
- timeout.tv_usec = 50 * 1000 * 2;
+ timeout.tv_usec = 100 * 1000;
this->masterFDSLock.lock();
readfds = masterfds;
@@ -111,15 +111,14 @@
/* Shelect!! */
int retVal = select(fdmax + 1, &readfds, NULL, &exceptionfds,
&timeout);
-
if (retVal != 0) {
- QString out("Select returned: ");
- out.append(QString::number(retVal));
- out.append(". FD count: ");
- out.append(QString::number(this->fdPortalMap->keys().size()));
- out.append(". MAX FD: ");
- out.append(QString::number(fdmax));
- this->log->logINFO("PortalManager", out);
+ QString out("Select returned: ");
+ out.append(QString::number(retVal));
+ out.append(". FD count: ");
+
out.append(QString::number(this->fdPortalMap->keys().size()));
+ out.append(". MAX FD: ");
+ out.append(QString::number(fdmax));
+ this->log->logINFO("PortalManager", out);
}
if (retVal < 0) {
@@ -140,8 +139,7 @@
/* Simplify switching later with bools now*/
isListener = (i == listener);
-/* readyRead = FD_ISSET(i, &readfds) && !isListener;*/
- readyRead = true; /* Hotwire for now.*/
+ readyRead = FD_ISSET(i, &readfds) && !isListener;
readyAccept = FD_ISSET(i, &readfds) && isListener;
readyException = FD_ISSET(i, &exceptionfds);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits