From 1debe2292d85e2d377064f74246244ac607046bf Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Wed, 2 May 2018 11:22:07 -0700 Subject: Cleanup. Misc type conversion and signedness fixes --- service/OneService.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'service/OneService.cpp') diff --git a/service/OneService.cpp b/service/OneService.cpp index 24456f71..27930a52 100644 --- a/service/OneService.cpp +++ b/service/OneService.cpp @@ -879,7 +879,6 @@ public: lastMultipathModeUpdate = now; _node->setMultipathMode(_multipathMode); } - // Test link speeds // TODO: This logic should eventually find its way into the core or as part of a passive // measure within the protocol. @@ -894,7 +893,7 @@ public: std::vector sockets = _binder.getBoundSockets(); // interfaces for (int i=0; ipeerCount;++j) { + for(size_t j=0;jpeerCount;++j) { for (int k=0; k<(ZT_MAX_PEER_NETWORK_PATHS/4); k++) { Utils::getSecureRandom(pktBuf, 8); // generate one random integer for unique id _phy.test_link_speed(sockets[i], (struct sockaddr*)&(pl->peers[j].paths[k].address), pktBuf, ZT_LINK_TEST_DATAGRAM_SZ); @@ -1554,7 +1553,7 @@ public: _primaryPort = (unsigned int)OSUtils::jsonInt(settings["primaryPort"],(uint64_t)_primaryPort) & 0xffff; _allowTcpFallbackRelay = OSUtils::jsonBool(settings["allowTcpFallbackRelay"],true); - _multipathMode = OSUtils::jsonInt(settings["multipathMode"],0); + _multipathMode = (unsigned int)OSUtils::jsonInt(settings["multipathMode"],0); if (_multipathMode != 0 && _allowTcpFallbackRelay) { fprintf(stderr,"WARNING: multipathMode cannot be used with allowTcpFallbackRelay. Disabling allowTcpFallbackRelay"); _allowTcpFallbackRelay = false; -- cgit v1.2.3