]> git.ipfire.org Git - thirdparty/cups-filters.git/commitdiff
implicitclass: Raise timeout for cups-browsed's answer from 20s to 60s
authorBhavna2020 <75832214+Bhavna2020@users.noreply.github.com>
Thu, 25 Feb 2021 17:38:30 +0000 (23:08 +0530)
committerTill Kamppeter <till.kamppeter@gmail.com>
Thu, 25 Feb 2021 17:51:25 +0000 (18:51 +0100)
(cherry picked from commit 6e5c375b56154301b193d4aba5eb80223eb0bd09)

backend/implicitclass.c

index 3ec5d811d72e44e9c9f729b5917767b2ad6ff614..6707754e959f711366d10a6e3e91331853c15d9d 100644 (file)
@@ -154,8 +154,8 @@ main(int  argc,                             /* I - Number of command-line args */
     httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL,
                     "localhost", ippPort(), "/printers/%s", queue_name);
     job_id = argv[1];
-    for (i = 0; i < 40; i++) {
-      /* Wait up to 20 sec for cups-browsed to supply the destination host */
+    for (i = 0; i < 120; i++) {
+      /* Wait up to 60 sec for cups-browsed to supply the destination host */
       /* Try reading the option in which cups-browsed has deposited the
         destination host */
       request = ippNewRequest(IPP_OP_GET_PRINTER_ATTRIBUTES);
@@ -218,7 +218,7 @@ main(int  argc,                             /* I - Number of command-line args */
       usleep(500000);
     }
 
-    if (i >= 40) {
+    if (i >= 120) {
       /* Timeout, no useful data from cups-browsed received */
       fprintf(stderr, "ERROR: No destination host name supplied by cups-browsed for printer \"%s\", is cups-browsed running?\n",
              queue_name);