summaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2015-05-06 23:50:10 +0000
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2015-05-06 23:50:10 +0000
commitf64b32d93456d6b42530dd5587759c163d7f8f95 (patch)
tree104b70c61243802684d4f6a0be2fc5be1ed8af34 /backend
parent560634d338e0bb4ed82140cecd410b5da5d29f08 (diff)
The IPP backend now correctly monitors jobs (<rdar://problem/20495955>)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12623 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'backend')
-rw-r--r--backend/ipp.c13
1 files changed, 13 insertions, 0 deletions
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);
}