# HG changeset patch # User displacer # Date 1159300750 0 # Node ID ef1031ba44fc8cdd58445acbe8dedf3703182b65 # Parent a78d4a552500ab96722d4261cea970be79b5e627 busy variable removed diff -r a78d4a552500 -r ef1031ba44fc QTfrontend/hwmap.cpp --- a/QTfrontend/hwmap.cpp Tue Sep 26 19:45:47 2006 +0000 +++ b/QTfrontend/hwmap.cpp Tue Sep 26 19:59:10 2006 +0000 @@ -8,7 +8,6 @@ #include -int HWMap::isBusy(0); // initialize static variable QList srvsList; QMutex tcpSrvMut; @@ -42,11 +41,9 @@ //deleteLater(); - tcpSrvMut.lock(); - if(isBusy) --isBusy; - tcpSrvMut.unlock(); emit ImageReceived(im); readbuffer.clear(); + if(srvsList.size()==1) srvsList.pop_front(); emit isReadyNow(); } @@ -100,14 +97,12 @@ void HWMap::Start() { tcpSrvMut.lock(); - if(!isBusy) { - ++isBusy; + if(srvsList.isEmpty()) { srvsList.push_back(this); tcpSrvMut.unlock(); } else { connect(srvsList.back(), SIGNAL(isReadyNow()), this, SLOT(tcpServerReady())); srvsList.push_back(this); - //deleteLater(); tcpSrvMut.unlock(); return; } diff -r a78d4a552500 -r ef1031ba44fc QTfrontend/hwmap.h --- a/QTfrontend/hwmap.h Tue Sep 26 19:45:47 2006 +0000 +++ b/QTfrontend/hwmap.h Tue Sep 26 19:59:10 2006 +0000 @@ -61,7 +61,6 @@ void isReadyNow(); private: - static int isBusy; void RealStart(); bool m_isStarted;