diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2013-03-21 16:18:58 +0100 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2013-03-21 16:18:58 +0100 |
commit | 945d2a8aeecf844137843265e72d7991f77c3353 (patch) | |
tree | 49691982528322e1d3b7ec0485bc57867ca4e541 | |
parent | b830da6163c6a55c8f12c219a6d00c7a479338da (diff) |
merge patch from Colin to fix error message from getaddrinfo() (#703603)
-rw-r--r-- | debian/changelog | 5 | ||||
-rw-r--r-- | methods/connect.cc | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 2a86d688a..68dd8c395 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,11 @@ apt (0.9.7.8~exp3) UNRELEASEDexperimental; urgency=low * test/integration/framework: - continue after test failure but preserve exit status + [ Colin Watson ] + * methods/connect.cc: + - provide useful error message in case of EAI_SYSTEM + (closes: #703603) + -- Michael Vogt <mvo@debian.org> Sun, 17 Mar 2013 19:46:23 +0100 apt (0.9.7.8~exp2) experimental; urgency=low diff --git a/methods/connect.cc b/methods/connect.cc index 9a092a43c..3573d3cbf 100644 --- a/methods/connect.cc +++ b/methods/connect.cc @@ -197,6 +197,9 @@ bool Connect(std::string Host,int Port,const char *Service,int DefPort,int &Fd, return _error->Error(_("Temporary failure resolving '%s'"), Host.c_str()); } + if (Res == EAI_SYSTEM) + return _error->Error(_("System error resolving '%s:%s' (%s)"), + Host.c_str(),ServStr,strerror(errno)); return _error->Error(_("Something wicked happened resolving '%s:%s' (%i - %s)"), Host.c_str(),ServStr,Res,gai_strerror(Res)); } |