X-Git-Url: https://git.hcoop.net/ntk/apt.git/blobdiff_plain/b19bc330d597d4b872ee9416ebeb9a86b9fc0763..b790b130ad0a43be5738c467c16bbc2dd657ca66:/methods/connect.cc diff --git a/methods/connect.cc b/methods/connect.cc index b85df688..8c2ac6d5 100644 --- a/methods/connect.cc +++ b/methods/connect.cc @@ -103,6 +103,8 @@ static bool DoConnect(struct addrinfo *Addr,string Host, if (Err != 0) { errno = Err; + if(errno == ECONNREFUSED) + Owner->SetFailExtraMsg("\nFailReason: ConnectionRefused"); return _error->Errno("connect",_("Could not connect to %s:%s (%s)."),Host.c_str(), Service,Name); } @@ -166,8 +168,11 @@ bool Connect(string Host,int Port,const char *Service,int DefPort,int &Fd, } if (Res == EAI_AGAIN) + { + Owner->SetFailExtraMsg("\nFailReason: TmpResolveFailure"); 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); }