diff options
| author | Joseph Henry <josephjah@gmail.com> | 2018-05-02 11:22:07 -0700 |
|---|---|---|
| committer | Joseph Henry <josephjah@gmail.com> | 2018-05-02 11:22:07 -0700 |
| commit | 1debe2292d85e2d377064f74246244ac607046bf (patch) | |
| tree | d2d17652451c4d0d92b17f65bd9de66638389bc0 /service/OneService.cpp | |
| parent | 6a2ba4baca326272c45930208b70cfedf8cb1638 (diff) | |
| download | infinitytier-1debe2292d85e2d377064f74246244ac607046bf.tar.gz infinitytier-1debe2292d85e2d377064f74246244ac607046bf.zip | |
Cleanup. Misc type conversion and signedness fixes
Diffstat (limited to 'service/OneService.cpp')
| -rw-r--r-- | service/OneService.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
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<PhySocket*> sockets = _binder.getBoundSockets(); // interfaces for (int i=0; i<ZT_BINDER_MAX_BINDINGS; i++) { - for(int j=0;j<pl->peerCount;++j) { + for(size_t j=0;j<pl->peerCount;++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; |
