]> git.saurik.com Git - apt.git/commitdiff
* methods/connect.cc:
authorMichael Vogt <michael.vogt@ubuntu.com>
Mon, 25 Mar 2013 08:03:48 +0000 (09:03 +0100)
committerMichael Vogt <michael.vogt@ubuntu.com>
Mon, 25 Mar 2013 08:03:48 +0000 (09:03 +0100)
  - use Errno() instead of strerror(), thanks to David Kalnischk

debian/changelog
methods/connect.cc

index 558b657ceccf89ed770423332722a32159893f5d..840fd697c16630af5b26d74c96c913e3241448ab 100644 (file)
@@ -12,6 +12,10 @@ apt (0.9.7.9~exp2) UNRELEASED; urgency=low
     - fix test now that #1098752 is fixed
   * po/{ca,cs,ru}.po:
     - fix merge artifact
+  
+  [ Michael Vogt ]
+  * methods/connect.cc:
+    - use Errno() instead of strerror(), thanks to David Kalnischk
 
  -- Christian Perrier <bubulle@debian.org>  Sun, 24 Mar 2013 08:57:45 +0100
 
index 35f4723ce33b2dbb3fac9cb96059107e95eba21c..fc7a72ee93a00ef9d3f9a9886d2ba9a7e083145c 100644 (file)
@@ -206,8 +206,8 @@ bool Connect(std::string Host,int Port,const char *Service,int DefPort,int &Fd,
                                    Host.c_str());
            }
            if (Res == EAI_SYSTEM)
-              return _error->Error(_("System error resolving '%s:%s' (%s)"),
-                                   Host.c_str(),ServStr,strerror(errno));
+              return _error->Errno("getaddrinfo", _("System error resolving '%s:%s'"),
+                                      Host.c_str(),ServStr);
            return _error->Error(_("Something wicked happened resolving '%s:%s' (%i - %s)"),
                                 Host.c_str(),ServStr,Res,gai_strerror(Res));
         }