From: mike Date: Thu, 14 Mar 2013 03:27:15 +0000 (+0000) Subject: SAve and use the IPP version from Get-Printer-Attributes (STR #4292) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3945ef670767b3169aec7e223066f17eb0416f40;p=thirdparty%2Fcups.git SAve and use the IPP version from Get-Printer-Attributes (STR #4292) git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@10906 7a7537e8-13f0-0310-91df-b6672ffda945 --- diff --git a/cups/cups-private.h b/cups/cups-private.h index 3d6b60f4ab..1debddd274 100644 --- a/cups/cups-private.h +++ b/cups/cups-private.h @@ -207,6 +207,7 @@ typedef struct _cups_dconstres_s /* Constraint/resolver */ struct _cups_dinfo_s /* Destination capability and status * information */ { + int version; /* IPP version */ const char *uri; /* Printer URI */ char *resource; /* Resource path */ ipp_t *attrs; /* Printer attributes */ diff --git a/cups/dest-job.c b/cups/dest-job.c index 9131b3ca43..85009faece 100644 --- a/cups/dest-job.c +++ b/cups/dest-job.c @@ -112,6 +112,8 @@ cupsCloseDestJob( return (IPP_STATUS_ERROR_INTERNAL); } + ippSetVersion(request, info->version / 10, info->version % 10); + ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, info->uri); ippAddInteger(request, IPP_TAG_OPERATION, IPP_TAG_INTEGER, "job-id", @@ -189,6 +191,8 @@ cupsCreateDestJob( return (IPP_STATUS_ERROR_INTERNAL); } + ippSetVersion(request, info->version / 10, info->version % 10); + ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, info->uri); ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name", @@ -327,6 +331,8 @@ cupsStartDestDocument( return (HTTP_STATUS_ERROR); } + ippSetVersion(request, info->version / 10, info->version % 10); + ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, info->uri); ippAddInteger(request, IPP_TAG_OPERATION, IPP_TAG_INTEGER, "job-id", job_id); diff --git a/cups/dest-options.c b/cups/dest-options.c index eab6076f63..3eb644c084 100644 --- a/cups/dest-options.c +++ b/cups/dest-options.c @@ -671,6 +671,7 @@ cupsCopyDestInfo( return (NULL); } + dinfo->version = version; dinfo->uri = uri; dinfo->resource = _cupsStrAlloc(resource); dinfo->attrs = response;