]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
SAve and use the IPP version from Get-Printer-Attributes (STR #4292)
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Thu, 14 Mar 2013 03:27:15 +0000 (03:27 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Thu, 14 Mar 2013 03:27:15 +0000 (03:27 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@10906 7a7537e8-13f0-0310-91df-b6672ffda945

cups/cups-private.h
cups/dest-job.c
cups/dest-options.c

index 3d6b60f4ab5f4142c113e3f6eb78b763408c78f6..1debddd2741b47527d1de4b7df328000c945e3bd 100644 (file)
@@ -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 */
index 9131b3ca43c156b7891b60f2fbc9ebdc8b218f54..85009faecec9c8f57d829ab6d95a68accf60cc68 100644 (file)
@@ -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);
index eab6076f63a69af941a4f039ce8978f3bd92ea52..3eb644c084d8b153bb916aa185e4abb058f99eef 100644 (file)
@@ -671,6 +671,7 @@ cupsCopyDestInfo(
     return (NULL);
   }
 
+  dinfo->version  = version;
   dinfo->uri      = uri;
   dinfo->resource = _cupsStrAlloc(resource);
   dinfo->attrs    = response;