]> git.saurik.com Git - apt.git/blobdiff - methods/connect.cc
* apt-pkg/algorithms.cc:
[apt.git] / methods / connect.cc
index 4e48927edf65fe3ac7d371875b0de6c031ed994d..aef7db3896d43de6f26bf2c2cdfd73f908fbaa69 100644 (file)
@@ -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);
    }
@@ -162,6 +164,7 @@ bool Connect(string Host,int Port,const char *Service,int DefPort,int &Fd,
                  DefPort = 0;
                  continue;
               }
+              Owner->SetFailExtraMsg("\nFailReason: ResolveFailure");
               return _error->Error(_("Could not resolve '%s'"),Host.c_str());
            }