From f64b32d93456d6b42530dd5587759c163d7f8f95 Mon Sep 17 00:00:00 2001 From: msweet Date: Wed, 6 May 2015 23:50:10 +0000 Subject: [PATCH] The IPP backend now correctly monitors jobs () git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12623 a1ca3aef-8c08-0410-bb20-df032aa958be --- CHANGES-2.0.txt | 2 ++ backend/ipp.c | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/CHANGES-2.0.txt b/CHANGES-2.0.txt index 0f58789f3..01326f19d 100644 --- a/CHANGES-2.0.txt +++ b/CHANGES-2.0.txt @@ -19,6 +19,8 @@ CHANGES IN CUPS V2.0.3 (STR #4603) - The scheduler could get caught in a busy loop (STR #4605) - The sample Epson driver could crash (STR #4616) + - The IPP backend now correctly monitors jobs + () - Added Russian translation (STR #4577) diff --git a/backend/ipp.c b/backend/ipp.c index dc7d8bb7d..8c8d1ddf7 100644 --- a/backend/ipp.c +++ b/backend/ipp.c @@ -64,6 +64,7 @@ typedef struct _cups_monitor_s /**** Monitoring data ****/ version, /* IPP version */ job_id, /* Job ID for submitted job */ job_reasons, /* Job state reasons bits */ + create_job, /* Support Create-Job? */ get_job_attrs; /* Support Get-Job-Attributes? */ const char *job_name; /* Job name for submitted job */ http_encryption_t encryption; /* Use encryption? */ @@ -1404,6 +1405,7 @@ main(int argc, /* I - Number of command-line args */ monitor.port = port; monitor.version = version; monitor.job_id = 0; + monitor.create_job = create_job; monitor.get_job_attrs = get_job_attrs; monitor.encryption = cupsEncryption(); monitor.job_state = IPP_JOB_PENDING; @@ -2344,6 +2346,15 @@ monitor_printer( if (cupsLastError() <= IPP_OK_CONFLICT) password_tries = 0; + if (monitor->job_id == 0 && monitor->create_job) + { + /* + * No job-id yet, so continue... + */ + + goto monitor_disconnect; + } + /* * Check the status of the job itself... */ @@ -2495,6 +2506,8 @@ monitor_printer( * Disconnect from the printer - we'll reconnect on the next poll... */ + monitor_disconnect: + _httpDisconnect(http); } -- 2.39.2