From 2ce8588b25181438337069cb323f6f920073c93b Mon Sep 17 00:00:00 2001 From: mike Date: Wed, 10 Oct 2007 22:14:03 +0000 Subject: [PATCH] The IPP backend now checks the job status at variable intervals (from 1 to 10 seconds) instead of every 10 seconds for faster remote printing (STR #2548) git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@7018 7a7537e8-13f0-0310-91df-b6672ffda945 --- CHANGES-1.3.txt | 4 ++++ backend/ipp.c | 10 +++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGES-1.3.txt b/CHANGES-1.3.txt index 1048fc386..3757bb665 100644 --- a/CHANGES-1.3.txt +++ b/CHANGES-1.3.txt @@ -3,6 +3,10 @@ CHANGES-1.3.txt CHANGES IN CUPS V1.3.4 + - The IPP backend now checks the job status at + variable intervals (from 1 to 10 seconds) instead + of every 10 seconds for faster remote printing + (STR #2548) - "lpr -p" and "lpr -l" did not work (STR #2544) - Compilation failed when a previous version of CUPS was installed and was included in the SSL include diff --git a/backend/ipp.c b/backend/ipp.c index 7c4b6b66a..d5f2e1f96 100644 --- a/backend/ipp.c +++ b/backend/ipp.c @@ -1055,7 +1055,7 @@ main(int argc, /* I - Number of command-line args */ _cupsLangPuts(stderr, _("INFO: Waiting for job to complete...\n")); - for (; !job_cancelled;) + for (delay = 1; !job_cancelled;) { /* * Build an IPP_GET_JOB_ATTRIBUTES request... @@ -1146,10 +1146,14 @@ main(int argc, /* I - Number of command-line args */ check_printer_state(http, uri, resource, argv[2], version, job_id); /* - * Wait 10 seconds before polling again... + * Wait 1-10 seconds before polling again... */ - sleep(10); + sleep(delay); + + delay ++; + if (delay > 10) + delay = 1; } } -- 2.39.5