]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Generate ETIMEDOUT when remaining_time is reached and EHOSTDOWN when all addresses... 3/head
authorZdenek Dohnal <zdohnal@redhat.com>
Thu, 21 May 2020 05:58:56 +0000 (07:58 +0200)
committerZdenek Dohnal <zdohnal@redhat.com>
Mon, 14 Sep 2020 09:14:30 +0000 (11:14 +0200)
cups/http-addrlist.c

index 485c6f43da2012f67d09b35440fdf8d11a44c419..a246394244611faae6cfa24fc61c4903acc9290d 100644 (file)
@@ -238,7 +238,10 @@ httpAddrConnect2(
     }
 
     if (!addrlist && nfds == 0)
+    {
+      errno = EHOSTDOWN;
       break;
+    }
 
    /*
     * See if we can connect to any of the addresses so far...
@@ -369,6 +372,9 @@ httpAddrConnect2(
       remaining -= 250;
   }
 
+  if (remaining <= 0)
+    errno = ETIMEDOUT;
+
   while (nfds > 0)
   {
     nfds --;