Unable to adjust job-quota-period, job-k-limit or job-page-limit #3077

Closed
michaelrsweet opened this Issue Jan 28, 2009 · 5 comments

Comments

Projects
None yet
1 participant
Collaborator

michaelrsweet commented Jan 28, 2009

Version: 1.3.9
CUPS.org User: twaugh.redhat

None of the quota-related options, job-quota-period, job-k-limit, and job-page-limit, can be set using lpadmin.

lpadmin -p printer -o job-quota-period=86400 -o job-k-limit=50

gives no error but /etc/cups/printers.conf is unchanged. This seems to be because cupsEncodeOptions2() finds a match for IPP_TAG_JOB for both options, but lpadmin is trying to encode them as IPP_TAG_PRINTER -- as a result they are both omitted from the IPP request.

Patch attached

Collaborator

michaelrsweet commented Jan 28, 2009

CUPS.org User: mike

Fixed in Subversion repository.

Collaborator

michaelrsweet commented Dec 15, 2009

CUPS.org User: ef

As I just ran into the same problem and was about to suggest the same fix: shouldn't copy_printer_attrs() also fill in these attributes?

Collaborator

michaelrsweet commented Dec 15, 2009

CUPS.org User: mike

All of the quota values are saved as attributes in cupsdSetPrinterAttrs, so copy_printer_attrs gets them from there...

Collaborator

michaelrsweet commented Dec 16, 2009

CUPS.org User: ef

Ah, thanks.
I was confused by printer-error-policy and printer-op-policy being set in copy_printer_attrs() itself.

Collaborator

michaelrsweet commented Dec 16, 2009

"0001-Quota-related-options-should-be-in-group-IPP_TAG_PRI.patch":

From bc69e31dc7b59748738c3a57456be25d4c7acc9c Mon Sep 17 00:00:00 2001
From: Tim Waugh twaugh@redhat.com
Date: Tue, 27 Jan 2009 16:12:59 +0000
Subject: [PATCH] Quota-related options should be in group IPP_TAG_PRINTER.


cups/encode.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/cups/encode.c b/cups/encode.c
index edd8d2d..53f4777 100644
--- a/cups/encode.c
+++ b/cups/encode.c
@@ -64,10 +64,10 @@ static const _ipp_option_t ipp_options[] =
{ 0, "gamma-default", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
{ 0, "hue", IPP_TAG_INTEGER, IPP_TAG_JOB },
{ 0, "hue-default", IPP_TAG_INTEGER, IPP_TAG_PRINTER },

  • { 0, "job-k-limit", IPP_TAG_INTEGER, IPP_TAG_JOB },
  • { 0, "job-page-limit", IPP_TAG_INTEGER, IPP_TAG_JOB },
  • { 0, "job-k-limit", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
  • { 0, "job-page-limit", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
    { 0, "job-priority", IPP_TAG_INTEGER, IPP_TAG_JOB },
  • { 0, "job-quota-period", IPP_TAG_INTEGER, IPP_TAG_JOB },
  • { 0, "job-quota-period", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
    { 1, "job-sheets", IPP_TAG_NAME, IPP_TAG_JOB },
    { 1, "job-sheets-default", IPP_TAG_NAME, IPP_TAG_PRINTER },
    { 0, "job-uuid", IPP_TAG_URI, IPP_TAG_JOB },
    --
    1.6.0.6

michaelrsweet added this to the Stable milestone Mar 17, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment