summaryrefslogtreecommitdiff
path: root/syncSocket.cpp
diff options
context:
space:
mode:
authorOthmar Gsenger <otti@anytun.org>2008-02-28 17:09:06 +0000
committerOthmar Gsenger <otti@anytun.org>2008-02-28 17:09:06 +0000
commit62c4bf0fd2b504798c120284958105681f9e20f6 (patch)
treee04cbc56baf28864313da2a26eb4cb43b43fe920 /syncSocket.cpp
parentreduced routing sync overhead (diff)
further routing fixes
Diffstat (limited to 'syncSocket.cpp')
-rw-r--r--syncSocket.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/syncSocket.cpp b/syncSocket.cpp
index ad7781b..d14ca23 100644
--- a/syncSocket.cpp
+++ b/syncSocket.cpp
@@ -36,11 +36,14 @@ void SyncSocket::OnAccept()
Send(sout.str());
}
sleep(1);
- if( ! gRoutingTable.empty())
- {
+ //TODO Locking here
+ RoutingMap::iterator it = gRoutingTable.getBeginUnlocked();
+ for (;it!=gRoutingTable.getEndUnlocked();++it)
+ {
+ NetworkPrefix tmp(it->first);
std::ostringstream sout;
boost::archive::text_oarchive oa(sout);
- const SyncCommand scom(0);
+ const SyncCommand scom(tmp);
oa << scom;
Send(sout.str());
}