diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-04-26 08:20:03 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-04-26 08:20:03 -0700 |
| commit | 90e1262a8b607f35af0eade34eba7a49217cb7ed (patch) | |
| tree | c23401c4afaff3a90e083fd69c133735a27b47f4 /node/IncomingPacket.cpp | |
| parent | 246f86dad356f660977617372cc9cc663111d821 (diff) | |
| download | infinitytier-90e1262a8b607f35af0eade34eba7a49217cb7ed.tar.gz infinitytier-90e1262a8b607f35af0eade34eba7a49217cb7ed.zip | |
More refactoring to remove old Dictionary dependencies.
Diffstat (limited to 'node/IncomingPacket.cpp')
| -rw-r--r-- | node/IncomingPacket.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/node/IncomingPacket.cpp b/node/IncomingPacket.cpp index e4427f06..b21b42a2 100644 --- a/node/IncomingPacket.cpp +++ b/node/IncomingPacket.cpp @@ -403,10 +403,9 @@ bool IncomingPacket::_doOK(const RuntimeEnvironment *RR,const SharedPtr<Peer> &p case Packet::VERB_NETWORK_CONFIG_REQUEST: { const SharedPtr<Network> nw(RR->node->network(at<uint64_t>(ZT_PROTO_VERB_NETWORK_CONFIG_REQUEST__OK__IDX_NETWORK_ID))); if ((nw)&&(nw->controller() == peer->address())) { - const unsigned int dictlen = at<uint16_t>(ZT_PROTO_VERB_NETWORK_CONFIG_REQUEST__OK__IDX_DICT_LEN); - const std::string dict((const char *)field(ZT_PROTO_VERB_NETWORK_CONFIG_REQUEST__OK__IDX_DICT,dictlen),dictlen); - if (dict.length()) { - nw->setConfiguration(Dictionary(dict)); + const unsigned int nclen = at<uint16_t>(ZT_PROTO_VERB_NETWORK_CONFIG_REQUEST__OK__IDX_DICT_LEN); + if (nclen) { + nw->setConfiguration(field(ZT_PROTO_VERB_NETWORK_CONFIG_REQUEST__OK__IDX_DICT,nclen),nclen,true); TRACE("got network configuration for network %.16llx from %s",(unsigned long long)nw->id(),source().toString().c_str()); } } |
