diff options
author | Thomas Winget <tewinget@gmail.com> | 2014-09-17 15:38:15 -0400 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2014-09-23 22:58:13 +0200 |
commit | 9a3b18dbc25632b801611f5030707fff5c6b098d (patch) | |
tree | d32c4f40ffaf6fc590249a6ae623f51b4114cd5e /src/common | |
parent | ipv4 and ipv6 resolution working (diff) | |
download | monero-9a3b18dbc25632b801611f5030707fff5c6b098d.tar.xz |
Use the loop iterator, previous version of me.
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/dns_utils.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/dns_utils.cpp b/src/common/dns_utils.cpp index f95a8d72b..e3be79371 100644 --- a/src/common/dns_utils.cpp +++ b/src/common/dns_utils.cpp @@ -76,7 +76,7 @@ std::vector<std::string> DNSResolver::get_ipv4(const std::string& url) char as_str[INET_ADDRSTRLEN]; // convert bytes to string, append if no error - if (inet_ntop(AF_INET, result->data[0], as_str, sizeof(as_str))) + if (inet_ntop(AF_INET, result->data[i], as_str, sizeof(as_str))) { retval.push_back(as_str); } @@ -104,7 +104,7 @@ std::vector<std::string> DNSResolver::get_ipv6(const std::string& url) char as_str[INET6_ADDRSTRLEN]; // convert bytes to string, append if no error - if (inet_ntop(AF_INET6, result->data[0], as_str, sizeof(as_str))) + if (inet_ntop(AF_INET6, result->data[i], as_str, sizeof(as_str))) { retval.push_back(as_str); } |