]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
The lpq command did not show the owner or title of jobs unless passed a username
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Mon, 16 Jul 2012 16:50:32 +0000 (16:50 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Mon, 16 Jul 2012 16:50:32 +0000 (16:50 +0000)
on the command-line (STR #4135)

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@10540 7a7537e8-13f0-0310-91df-b6672ffda945

CHANGES-1.5.txt
berkeley/lpq.c

index d2296f4fa617d77d69a5fa7c15c9b9858276b30a..5522ccfce41874df82a41622539cdb02bfe95dda 100644 (file)
@@ -4,6 +4,8 @@ CHANGES-1.5.txt
 CHANGES IN CUPS V1.5.4
 
        - Documentation updates (STR #4112)
+       - The lpq command did not show the owner or title of jobs unless passed
+         a username on the command-line (STR #4135)
        - Localized empty strings contained the message catalog metadata
          (STR #4119)
        - Fixed a crash in the libusb-based USB backend (STR #4099)
index 59f76fc2164ba1034ef53879c3cb866219130934..60184eb9573c06bff3f114ba5df19f4d28e1ca85 100644 (file)
@@ -3,7 +3,7 @@
  *
  *   "lpq" command for CUPS.
  *
- *   Copyright 2007-2011 by Apple Inc.
+ *   Copyright 2007-2012 by Apple Inc.
  *   Copyright 1997-2006 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
@@ -371,6 +371,7 @@ show_jobs(const char *command,              /* I - Command name */
   *    attributes-natural-language
   *    job-uri or printer-uri
   *    requested-attributes
+  *    requesting-user-name
   */
 
   request = ippNewRequest(id ? IPP_GET_JOB_ATTRIBUTES : IPP_GET_JOBS);
@@ -399,6 +400,9 @@ show_jobs(const char *command,              /* I - Command name */
                  "requesting-user-name", NULL, user);
     ippAddBoolean(request, IPP_TAG_OPERATION, "my-jobs", 1);
   }
+  else
+    ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
+                 "requesting-user-name", NULL, cupsUser());
 
   ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD,
                 "requested-attributes",
@@ -447,8 +451,8 @@ show_jobs(const char *command,              /* I - Command name */
       jobpriority = 50;
 #endif /* __osf__ */
       jobstate    = IPP_JOB_PENDING;
-      jobname     = "untitled";
-      jobuser     = NULL;
+      jobname     = "unknown";
+      jobuser     = "unknown";
       jobdest     = NULL;
       jobcopies   = 1;