From 0b354803f3ea0eecd046a37c51d4d2d78934b502 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Mon, 13 Jul 2015 10:03:04 -0700 Subject: Clean up some YAGNI issues with implementation of GitHub issue #180, and make best path choice aware of path rank. --- node/Node.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'node/Node.cpp') diff --git a/node/Node.cpp b/node/Node.cpp index 3df34aec..ebe0527e 100644 --- a/node/Node.cpp +++ b/node/Node.cpp @@ -432,11 +432,11 @@ void Node::freeQueryResult(void *qr) ::free(qr); } -int Node::addLocalInterfaceAddress(const struct sockaddr_storage *addr,int metric,ZT1_LocalInterfaceAddressTrust trust,int reliable) +int Node::addLocalInterfaceAddress(const struct sockaddr_storage *addr,int metric,ZT1_LocalInterfaceAddressTrust trust) { if (Path::isAddressValidForPath(*(reinterpret_cast(addr)))) { Mutex::Lock _l(_directPaths_m); - _directPaths.push_back(Path(*(reinterpret_cast(addr)),metric,(Path::Trust)trust,reliable != 0)); + _directPaths.push_back(Path(*(reinterpret_cast(addr)),metric,(Path::Trust)trust)); std::sort(_directPaths.begin(),_directPaths.end()); _directPaths.erase(std::unique(_directPaths.begin(),_directPaths.end()),_directPaths.end()); return 1; @@ -711,10 +711,10 @@ void ZT1_Node_setNetconfMaster(ZT1_Node *node,void *networkControllerInstance) } catch ( ... ) {} } -int ZT1_Node_addLocalInterfaceAddress(ZT1_Node *node,const struct sockaddr_storage *addr,int metric,ZT1_LocalInterfaceAddressTrust trust,int reliable) +int ZT1_Node_addLocalInterfaceAddress(ZT1_Node *node,const struct sockaddr_storage *addr,int metric,ZT1_LocalInterfaceAddressTrust trust) { try { - return reinterpret_cast(node)->addLocalInterfaceAddress(addr,metric,trust,reliable); + return reinterpret_cast(node)->addLocalInterfaceAddress(addr,metric,trust); } catch ( ... ) { return 0; } -- cgit v1.2.3