iterator through resolver's results
Some checks failed
Build containers / Building container for ${{ matrix.platform }} (arm64, linux/arm64) (push) Has been cancelled
Build containers / Building container for ${{ matrix.platform }} (armv7, linux/arm/v7) (push) Has been cancelled
Build containers / Building container for ${{ matrix.platform }} (i386, linux/386) (push) Has been cancelled
Build Debian packages / ${{ matrix.dist }} (bookworm) (push) Has been cancelled
Build Debian packages / ${{ matrix.dist }} (bullseye) (push) Has been cancelled
Build Debian packages / ${{ matrix.dist }} (buster) (push) Has been cancelled
Build on FreeBSD / with UPnP (push) Has been cancelled
Build on OSX / With USE_UPNP=${{ matrix.with_upnp }} (no) (push) Has been cancelled
Build on OSX / With USE_UPNP=${{ matrix.with_upnp }} (yes) (push) Has been cancelled
Build on Windows / ${{ matrix.arch }} (clang-x86_64, x64-clang, clang, CLANG64) (push) Has been cancelled
Build on Windows / ${{ matrix.arch }} (i686, x86, gcc, MINGW32) (push) Has been cancelled
Build on Windows / ${{ matrix.arch }} (ucrt-x86_64, x64-ucrt, gcc, UCRT64) (push) Has been cancelled
Build on Windows / ${{ matrix.arch }} (x86_64, x64, gcc, MINGW64) (push) Has been cancelled
Build on Windows / CMake ${{ matrix.arch }} (clang-x86_64, x64-clang, clang, CLANG64) (push) Has been cancelled
Build on Windows / CMake ${{ matrix.arch }} (i686, x86, gcc, MINGW32) (push) Has been cancelled
Build on Windows / CMake ${{ matrix.arch }} (ucrt-x86_64, x64-ucrt, gcc, UCRT64) (push) Has been cancelled
Build on Windows / CMake ${{ matrix.arch }} (x86_64, x64, gcc, MINGW64) (push) Has been cancelled
Build on Windows / XP (push) Has been cancelled
Build on Ubuntu / Make with USE_UPNP=${{ matrix.with_upnp }} (no) (push) Has been cancelled
Build on Ubuntu / Make with USE_UPNP=${{ matrix.with_upnp }} (yes) (push) Has been cancelled
Build on Ubuntu / CMake with -DWITH_UPNP=${{ matrix.with_upnp }} (OFF) (push) Has been cancelled
Build on Ubuntu / CMake with -DWITH_UPNP=${{ matrix.with_upnp }} (ON) (push) Has been cancelled
Build containers / Building container for ${{ matrix.platform }} (amd64, linux/amd64) (push) Has been cancelled
Build containers / Pushing merged manifest (push) Has been cancelled

This commit is contained in:
orignal 2024-11-25 19:16:42 -05:00
parent ffd18baf30
commit cc768de8ea
3 changed files with 8 additions and 12 deletions

View file

@ -641,9 +641,9 @@ namespace data
if (!ecode)
{
bool connected = false;
for (auto it = endpoints.begin (); it != endpoints.end ();)
for (const auto& it: endpoints)
{
boost::asio::ip::tcp::endpoint ep = *it;
boost::asio::ip::tcp::endpoint ep = it;
bool supported = false;
if (!ep.address ().is_unspecified ())
{
@ -663,7 +663,6 @@ namespace data
break;
}
}
it++;
}
if (!connected)
{
@ -750,9 +749,9 @@ namespace data
if (!ecode)
{
bool connected = false;
for (auto it = endpoints.begin (); it != endpoints.end ();)
for (const auto& it: endpoints)
{
boost::asio::ip::tcp::endpoint ep = *it;
boost::asio::ip::tcp::endpoint ep = it;
if (
i2p::util::net::IsYggdrasilAddress (ep.address ()) &&
i2p::context.SupportsMesh ()
@ -766,7 +765,6 @@ namespace data
break;
}
}
it++;
}
if (!connected)
{

View file

@ -67,9 +67,9 @@ namespace util
{
bool found = false;
boost::asio::ip::udp::endpoint ep;
for (auto it = endpoints.begin (); it != endpoints.end ();)
for (const auto& it: endpoints)
{
ep = *it;
ep = it;
if (!ep.address ().is_unspecified ())
{
if (ep.address ().is_v4 ())
@ -86,7 +86,6 @@ namespace util
}
}
if (found) break;
it++;
}
if (!found)
{

View file

@ -752,9 +752,9 @@ namespace client
boost::asio::ip::tcp::endpoint ep;
if (m_LocalAddress)
{
for (auto it = endpoints.begin (); it != endpoints.end ();)
for (const auto& it: endpoints)
{
ep = *it;
ep = it;
if (!ep.address ().is_unspecified ())
{
if (ep.address ().is_v4 ())
@ -773,7 +773,6 @@ namespace client
}
}
if (found) break;
it++;
}
}
else