summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2019-07-29 23:14:47 +0200
committerlouiz’ <louiz@louiz.org>2019-07-29 23:14:47 +0200
commitce7b8395d0091af1b654d01c0ac21913907d8820 (patch)
tree48b6ffc202a69fdd2e37a919a4138ca394087cdd /src/network
parent3621458d3f5eb369106abb5f3555e2097f461e63 (diff)
downloadbiboumi-ce7b8395d0091af1b654d01c0ac21913907d8820.tar.gz
biboumi-ce7b8395d0091af1b654d01c0ac21913907d8820.tar.bz2
biboumi-ce7b8395d0091af1b654d01c0ac21913907d8820.tar.xz
biboumi-ce7b8395d0091af1b654d01c0ac21913907d8820.zip
Add an error message on DNS resolution failure for IPv6 only
Diffstat (limited to 'src/network')
-rw-r--r--src/network/resolver.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/network/resolver.cpp b/src/network/resolver.cpp
index ef54ba2..42d6969 100644
--- a/src/network/resolver.cpp
+++ b/src/network/resolver.cpp
@@ -213,6 +213,12 @@ void Resolver::on_hostname6_resolved(dns_rr_a6 *result)
this->call_getaddrinfo(buf, this->port.data(), AI_NUMERICHOST);
}
}
+ else
+ {
+ const auto error = dns_error_messages.find(status);
+ if (error != end(dns_error_messages))
+ this->error_msg = error->second;
+ }
}
void Resolver::after_resolved()