Просмотр исходного кода

Remember hosts with general failures for
https://wiki.ubuntu.com/NetworklessInstallationFixes (LP: #556831).

Michael Vogt лет назад: 16
Родитель
Сommit
785b920b8c
2 измененных файлов с 7 добавлено и 0 удалено
  1. 4 0
      debian/changelog
  2. 3 0
      methods/connect.cc

+ 4 - 0
debian/changelog

@@ -1,5 +1,9 @@
 apt (0.7.25.4) UNRELEASED; urgency=low
 apt (0.7.25.4) UNRELEASED; urgency=low
 
 
+  [ Evan Dandrea ]
+  * Remember hosts with general failures for
+    https://wiki.ubuntu.com/NetworklessInstallationFixes (LP: #556831).
+  
   [ Ivan Masár ]
   [ Ivan Masár ]
   * Slovak translation update. Closes: #568294
   * Slovak translation update. Closes: #568294
   
   

+ 3 - 0
methods/connect.cc

@@ -116,6 +116,9 @@ static bool DoConnect(struct addrinfo *Addr,string Host,
       errno = Err;
       errno = Err;
       if(errno == ECONNREFUSED)
       if(errno == ECONNREFUSED)
          Owner->SetFailExtraMsg("\nFailReason: ConnectionRefused");
          Owner->SetFailExtraMsg("\nFailReason: ConnectionRefused");
+      else if (errno == ETIMEDOUT)
+	 Owner->SetFailExtraMsg("\nFailReason: ConnectionTimedOut");
+      bad_addr.insert(bad_addr.begin(), string(Name));
       return _error->Errno("connect",_("Could not connect to %s:%s (%s)."),Host.c_str(),
       return _error->Errno("connect",_("Could not connect to %s:%s (%s)."),Host.c_str(),
 			   Service,Name);
 			   Service,Name);
    }
    }