]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/http-addrlist.c
Import all of the bug fixes from the OpenPrinting CUPS repository.
[thirdparty/cups.git] / cups / http-addrlist.c
index 485c6f43da2012f67d09b35440fdf8d11a44c419..89b3d92fb6fc2bb1f57c552a875f494be76f8e02 100644 (file)
@@ -238,7 +238,14 @@ httpAddrConnect2(
     }
 
     if (!addrlist && nfds == 0)
+    {
+#ifdef _WIN32
+      errno = WSAEHOSTDOWN;
+#else
+      errno = EHOSTDOWN;
+#endif // _WIN32
       break;
+    }
 
    /*
     * See if we can connect to any of the addresses so far...
@@ -369,6 +376,9 @@ httpAddrConnect2(
       remaining -= 250;
   }
 
+  if (remaining <= 0)
+    errno = ETIMEDOUT;
+
   while (nfds > 0)
   {
     nfds --;