[cups.bugs] [LOW] STR #3428: Double "job-name" attribute

Serj Kalichev serj.kalichev at gmail.com
Tue Nov 24 22:53:01 PST 2009


DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Every job has two "job-name" attributes.
The bug is in the ipp.h add_job() function.
The first setting of job-name is:
 if ((attr = ippFindAttribute(con->request, "job-name",
                               IPP_TAG_NAME)) != NULL)
    title = attr->values[0].string.text;
  else
    ippAddString(con->request, IPP_TAG_JOB, IPP_TAG_NAME, "job-name",
NULL,
                 title = "Untitled");
And the second setting is:
  ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_NAME, "job-name", NULL,
               title);


The simple patch for cups 1.4.1:

Index: cups/scheduler/ipp.c
===================================================================
--- cups.orig/scheduler/ipp.c   2009-11-20 21:47:40.000000000 +0300
+++ cups/scheduler/ipp.c        2009-11-20 21:49:20.000000000 +0300
@@ -1706,8 +1706,8 @@ add_job(cupsd_client_t  *con,             /* I - Cl
                               "job-media-sheets-completed", 0);
   ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_URI, "job-printer-uri",
NULL,
                printer->uri);
-  ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_NAME, "job-name", NULL,
-               title);
+//  ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_NAME, "job-name", NULL,
+//               title);
 
   if ((attr = ippFindAttribute(job->attrs, "job-k-octets",
                                IPP_TAG_INTEGER)) != NULL)

Link: http://www.cups.org/str.php?L3428
Version: 1.4-current





More information about the cups-devel mailing list