summaryrefslogtreecommitdiff
path: root/syncSocket.cpp
diff options
context:
space:
mode:
authorOthmar Gsenger <otti@anytun.org>2008-02-28 17:44:08 +0000
committerOthmar Gsenger <otti@anytun.org>2008-02-28 17:44:08 +0000
commit54cbc83f2f67b068e767b6a8dadeb760af289d77 (patch)
tree91592f00d726f29bd807a4421eee24c5b5de60c0 /syncSocket.cpp
parentfurther routing fixes (diff)
added control interface
Diffstat (limited to 'syncSocket.cpp')
-rw-r--r--syncSocket.cpp7
1 files changed, 4 insertions, 3 deletions
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)