]> git.saurik.com Git - apt.git/blobdiff - methods/connect.cc
Add a GetListOfFilesInDir() helper method which replaces the old
[apt.git] / methods / connect.cc
index b5f48907ec97460a251bb4a035c8e7001e9e74a5..adb16a19973c9341dfc9b38f0a311f913cac63a2 100644 (file)
@@ -158,6 +158,7 @@ bool Connect(string Host,int Port,const char *Service,int DefPort,int &Fd,
       struct addrinfo Hints;
       memset(&Hints,0,sizeof(Hints));
       Hints.ai_socktype = SOCK_STREAM;
+      Hints.ai_flags = AI_ADDRCONFIG;
       Hints.ai_protocol = 0;
       
       // if we couldn't resolve the host before, we don't try now
@@ -190,8 +191,8 @@ bool Connect(string Host,int Port,const char *Service,int DefPort,int &Fd,
               return _error->Error(_("Temporary failure resolving '%s'"),
                                    Host.c_str());
            }
-           return _error->Error(_("Something wicked happened resolving '%s:%s' (%i)"),
-                                Host.c_str(),ServStr,Res);
+           return _error->Error(_("Something wicked happened resolving '%s:%s' (%i - %s)"),
+                                Host.c_str(),ServStr,Res,gai_strerror(Res));
         }
         break;
       }