From 54cbc83f2f67b068e767b6a8dadeb760af289d77 Mon Sep 17 00:00:00 2001 From: Othmar Gsenger Date: Thu, 28 Feb 2008 17:44:08 +0000 Subject: added control interface --- syncSocket.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'syncSocket.cpp') diff --git a/syncSocket.cpp b/syncSocket.cpp index d14ca23..d557bf4 100644 --- a/syncSocket.cpp +++ b/syncSocket.cpp @@ -27,15 +27,16 @@ void SyncSocket::OnAccept() // Send( Utility::GetLocalAddress() + "\n"); // Send("Number of sockets in list : " + Utility::l2string(Handler().GetCount()) + "\n"); // Send("\n"); - if( ! cl_.empty()) + //TODO Locking here + ConnectionMap::iterator cit = cl_.getBeginUnlocked(); + for (;cit!=cl_.getEndUnlocked();++cit) { std::ostringstream sout; boost::archive::text_oarchive oa(sout); - const SyncCommand scom(cl_,0); + const SyncCommand scom(cl_,cit->first); oa << scom; Send(sout.str()); } - sleep(1); //TODO Locking here RoutingMap::iterator it = gRoutingTable.getBeginUnlocked(); for (;it!=gRoutingTable.getEndUnlocked();++it) -- cgit v1.2.3