aboutsummaryrefslogtreecommitdiffstats
path: root/cups/dest-job.c
diff options
context:
space:
mode:
authorPhilip P. Moltmann <moltmann@google.com>2018-03-16 14:38:27 -0700
committerPhilip P. Moltmann <moltmann@google.com>2018-03-19 09:16:29 -0700
commit985548d9a7de8cde72ea0b5a81f6f0854d049454 (patch)
treef82a2c6d750e2ab5873e0ab6a1b71cd7a2631e1f /cups/dest-job.c
parentcbcd27119edc01ce3009d6a90d47abf2d486b61d (diff)
downloadplatform_external_libcups-985548d9a7de8cde72ea0b5a81f6f0854d049454.tar.gz
platform_external_libcups-985548d9a7de8cde72ea0b5a81f6f0854d049454.tar.bz2
platform_external_libcups-985548d9a7de8cde72ea0b5a81f6f0854d049454.zip
Test: Printed a page using this library (using the default print service) Fixes: 71766736 Change-Id: I24874e9b4c95102c5d9a0d709326748c0433ca24
Diffstat (limited to 'cups/dest-job.c')
-rw-r--r--cups/dest-job.c34
1 files changed, 31 insertions, 3 deletions
diff --git a/cups/dest-job.c b/cups/dest-job.c
index b0d89b6e..f12b1dc5 100644
--- a/cups/dest-job.c
+++ b/cups/dest-job.c
@@ -1,7 +1,7 @@
/*
* Destination job support for CUPS.
*
- * Copyright 2012-2016 by Apple Inc.
+ * Copyright 2012-2017 by Apple Inc.
*
* These coded instructions, statements, and computer programs are the
* property of Apple Inc. and are protected by Federal copyright
@@ -25,13 +25,13 @@
* The "job_id" is the number returned by cupsCreateDestJob.
*
* Returns @code IPP_STATUS_OK@ on success and
- * @code IPP_STATUS_ERRPR_NOT_AUTHORIZED@ or
+ * @code IPP_STATUS_ERROR_NOT_AUTHORIZED@ or
* @code IPP_STATUS_ERROR_FORBIDDEN@ on failure.
*
* @since CUPS 1.6/macOS 10.8@
*/
-ipp_status_t
+ipp_status_t /* O - Status of cancel operation */
cupsCancelDestJob(http_t *http, /* I - Connection to destination */
cups_dest_t *dest, /* I - Destination */
int job_id) /* I - Job ID */
@@ -84,6 +84,13 @@ cupsCloseDestJob(
DEBUG_printf(("cupsCloseDestJob(http=%p, dest=%p(%s/%s), info=%p, job_id=%d)", (void *)http, (void *)dest, dest ? dest->name : NULL, dest ? dest->instance : NULL, (void *)info, job_id));
/*
+ * Get the default connection as needed...
+ */
+
+ if (!http)
+ http = _cupsConnect();
+
+ /*
* Range check input...
*/
@@ -172,6 +179,13 @@ cupsCreateDestJob(
"job_id=%p, title=\"%s\", num_options=%d, options=%p)", (void *)http, (void *)dest, dest ? dest->name : NULL, dest ? dest->instance : NULL, (void *)info, (void *)job_id, title, num_options, (void *)options));
/*
+ * Get the default connection as needed...
+ */
+
+ if (!http)
+ http = _cupsConnect();
+
+ /*
* Range check input...
*/
@@ -252,6 +266,13 @@ cupsFinishDestDocument(
DEBUG_printf(("cupsFinishDestDocument(http=%p, dest=%p(%s/%s), info=%p)", (void *)http, (void *)dest, dest ? dest->name : NULL, dest ? dest->instance : NULL, (void *)info));
/*
+ * Get the default connection as needed...
+ */
+
+ if (!http)
+ http = _cupsConnect();
+
+ /*
* Range check input...
*/
@@ -307,6 +328,13 @@ cupsStartDestDocument(
DEBUG_printf(("cupsStartDestDocument(http=%p, dest=%p(%s/%s), info=%p, job_id=%d, docname=\"%s\", format=\"%s\", num_options=%d, options=%p, last_document=%d)", (void *)http, (void *)dest, dest ? dest->name : NULL, dest ? dest->instance : NULL, (void *)info, job_id, docname, format, num_options, (void *)options, last_document));
/*
+ * Get the default connection as needed...
+ */
+
+ if (!http)
+ http = _cupsConnect();
+
+ /*
* Range check input...
*/