]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Report when new jobs are being held (Issue #4761)
authorMichael R Sweet <michaelrsweet@gmail.com>
Wed, 1 Nov 2017 16:58:17 +0000 (12:58 -0400)
committerMichael R Sweet <michaelrsweet@gmail.com>
Wed, 1 Nov 2017 16:58:17 +0000 (12:58 -0400)
CHANGES.md
systemv/cupsaccept.c
systemv/lpstat.c

index 0dc43a05574731bce9c9d17acdcfa1c361295ea3..3d98a44f8dc9ea7423ba75c20a5ddb743d0018b8 100644 (file)
@@ -5,6 +5,7 @@ CHANGES - 2.3b1 - 2017-11-01
 Changes in CUPS v2.3b1
 ----------------------
 
+- The lpstat command now reports when new jobs are being held (Issue #4761)
 - No longer support backslash, question mark, or quotes in printer names
   (Issue #4966)
 - Dropped RSS subscription management from the web interface (Issue #5012)
index 5e5c183883a4282b6857c225d779914a299678d9..81955d1d5c29a0915d318f81a99d8a0d2e103b84 100644 (file)
@@ -2,7 +2,7 @@
  * "cupsaccept", "cupsdisable", "cupsenable", and "cupsreject" commands for
  * CUPS.
  *
- * Copyright 2007-2016 by Apple Inc.
+ * Copyright 2007-2017 by Apple Inc.
  * Copyright 1997-2006 by Easy Software Products.
  *
  * These coded instructions, statements, and computer programs are the
@@ -83,11 +83,11 @@ main(int  argc,                             /* I - Number of command-line arguments */
        switch (*opt)
        {
          case 'E' : /* Encrypt */
-  #ifdef HAVE_SSL
+#ifdef HAVE_SSL
              cupsSetEncryption(HTTP_ENCRYPT_REQUIRED);
-  #else
+#else
              _cupsLangPrintf(stderr, _("%s: Sorry, no encryption support."), command);
-  #endif /* HAVE_SSL */
+#endif /* HAVE_SSL */
              break;
 
          case 'U' : /* Username */
index cda457173c5a843d1f5b34155add6825197e7efe..0ea69c65fea947756765918d54edd3ab117bee06 100644 (file)
@@ -1795,20 +1795,16 @@ show_printers(const char  *printers,    /* I - Destinations */
         switch (pstate)
        {
          case IPP_PRINTER_IDLE :
-             _cupsLangPrintf(stdout,
-                             _("printer %s is idle.  enabled since %s"),
-                             printer, printer_state_time);
+             if (ippContainsString(reasons, "hold-new-jobs"))
+               _cupsLangPrintf(stdout, _("printer %s is holding new jobs.  enabled since %s"), printer, printer_state_time);
+             else
+               _cupsLangPrintf(stdout, _("printer %s is idle.  enabled since %s"), printer, printer_state_time);
              break;
          case IPP_PRINTER_PROCESSING :
-             _cupsLangPrintf(stdout,
-                             _("printer %s now printing %s-%d.  "
-                               "enabled since %s"),
-                             printer, printer, jobid, printer_state_time);
+             _cupsLangPrintf(stdout, _("printer %s now printing %s-%d.  enabled since %s"), printer, printer, jobid, printer_state_time);
              break;
          case IPP_PRINTER_STOPPED :
-             _cupsLangPrintf(stdout,
-                             _("printer %s disabled since %s -"),
-                             printer, printer_state_time);
+             _cupsLangPrintf(stdout, _("printer %s disabled since %s -"), printer, printer_state_time);
              break;
        }