diff options
author | Othmar Gsenger <otti@anytun.org> | 2008-02-28 17:09:06 +0000 |
---|---|---|
committer | Othmar Gsenger <otti@anytun.org> | 2008-02-28 17:09:06 +0000 |
commit | 62c4bf0fd2b504798c120284958105681f9e20f6 (patch) | |
tree | e04cbc56baf28864313da2a26eb4cb43b43fe920 /syncSocket.cpp | |
parent | reduced routing sync overhead (diff) |
further routing fixes
Diffstat (limited to 'syncSocket.cpp')
-rw-r--r-- | syncSocket.cpp | 9 |
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()); } |