diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-08-08 17:33:26 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-08-08 17:33:26 -0700 |
| commit | 00fd9c3a15f9ac0981cf79c98515df888b3bd109 (patch) | |
| tree | be2aeb7bbeb87b09cc43f4120c5fe39c0e467a06 /node/Topology.cpp | |
| parent | 8007ca56aaa2781e068ce9e3849a64b1e7bf7b8f (diff) | |
| download | infinitytier-00fd9c3a15f9ac0981cf79c98515df888b3bd109.tar.gz infinitytier-00fd9c3a15f9ac0981cf79c98515df888b3bd109.zip | |
It builds... almost ready to test some rules engine stuff.
Diffstat (limited to 'node/Topology.cpp')
| -rw-r--r-- | node/Topology.cpp | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/node/Topology.cpp b/node/Topology.cpp index ef1c1698..6e0fe90c 100644 --- a/node/Topology.cpp +++ b/node/Topology.cpp @@ -74,34 +74,6 @@ Topology::Topology(const RuntimeEnvironment *renv) : Topology::~Topology() { - Buffer<ZT_PEER_SUGGESTED_SERIALIZATION_BUFFER_SIZE> *pbuf = 0; - try { - pbuf = new Buffer<ZT_PEER_SUGGESTED_SERIALIZATION_BUFFER_SIZE>(); - std::string all; - - Address *a = (Address *)0; - SharedPtr<Peer> *p = (SharedPtr<Peer> *)0; - Hashtable< Address,SharedPtr<Peer> >::Iterator i(_peers); - while (i.next(a,p)) { - if (std::find(_rootAddresses.begin(),_rootAddresses.end(),*a) == _rootAddresses.end()) { - pbuf->clear(); - try { - (*p)->serialize(*pbuf); - try { - all.append((const char *)pbuf->data(),pbuf->size()); - } catch ( ... ) { - return; // out of memory? just skip - } - } catch ( ... ) {} // peer too big? shouldn't happen, but it so skip - } - } - - RR->node->dataStorePut("peers.save",all,true); - - delete pbuf; - } catch ( ... ) { - delete pbuf; - } } SharedPtr<Peer> Topology::addPeer(const SharedPtr<Peer> &peer) |
