]> git.saurik.com Git - apt.git/commitdiff
merge patch from Colin to fix error message from getaddrinfo() (#703603)
authorMichael Vogt <michael.vogt@ubuntu.com>
Thu, 21 Mar 2013 15:18:58 +0000 (16:18 +0100)
committerMichael Vogt <michael.vogt@ubuntu.com>
Thu, 21 Mar 2013 15:18:58 +0000 (16:18 +0100)
debian/changelog
methods/connect.cc

index 2a86d688a6161ab0dc73d62e5b374decda2f9393..68dd8c39534d7c4509f8fc8c10cf24cb163a05d8 100644 (file)
@@ -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
index 9a092a43c20298ea47034ca157e76e7e64a9d5d6..3573d3cbf69f60bdbf5da3ff5ae532e58c9376ec 100644 (file)
@@ -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));
         }