Revision: 40639
http://brlcad.svn.sourceforge.net/brlcad/?rev=40639&view=rev
Author: davidloman
Date: 2010-09-22 12:54:27 +0000 (Wed, 22 Sep 2010)
Log Message:
-----------
Fix a small error in the PortalManagers main loop. If no new client this loop,
then check portals prior to waiting for connection again.
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-22 11:20:12 UTC (rev
40638)
+++ rt^3/trunk/src/libNet/PortalManager.cxx 2010-09-22 12:54:27 UTC (rev
40639)
@@ -55,29 +55,24 @@
{
PkgTcpClient* client = (PkgTcpClient*) this->tcpServer->waitForClient(123);
- if (client == 0) {
- //Handle failure here.
- return;
- } else {
- Portal* newPortal = new Portal(client);
-
+ if (client != 0) {
//Handle new client here.
+ Portal* newPortal = new Portal(client);
this->portalsLock->lock();
this->portals->append(newPortal);
this->portalsLock->unlock();
}
+ //regardless of new client or not, process existing portals
QMutexLocker locker(this->portalsLock);
- //Handle existing clients here
-
for (int i = 0; i < this->portals->size(); ++i) {
Portal* p = this->portals->at(i);
int retval = p->sendRecv();
if (retval <= 0) {
- //disconnect
+ //disconnect this portal
continue;
}
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