-
Notifications
You must be signed in to change notification settings - Fork 261
Description
I'm using CUPS 2.3.1 on Ubuntu 20.04
Suppose I have the following queues (all of them with no jobs):
Q1, Q2, Q3, Q4, Q5
and this file (file.ipp):
{
OPERATION CUPS-Get-Printers
GROUP operation-attributes-tag
ATTR charset attributes-charset utf-8
ATTR language attributes-natural-language en
ATTR keyword requested-attributes printer-name,printer-state,queued-job-count
STATUS successful-ok
DISPLAY printer-name
DISPLAY printer-state
DISPLAY queued-job-count
}
when I run this command
ipptool ipp://localhost file.ipp
I get an output like this
printer-name printer-state queued-job-count
Q1 idle
Q3 idle
Q5 idle
Notice that queues Q2 and Q4 didn't show up and the job count is empty (and not 0 as expected)
I've got the same behaviour when running with -c, but the correct one when using -X or -t.
Now, if I change the order of the DISPLAY directives as follows
{
OPERATION CUPS-Get-Printers
GROUP operation-attributes-tag
ATTR charset attributes-charset utf-8
ATTR language attributes-natural-language en
ATTR keyword requested-attributes printer-name,printer-state,queued-job-count
STATUS successful-ok
DISPLAY queued-job-count
DISPLAY printer-name
DISPLAY printer-state
}
the output correctly shows all queues and the job count as 0s:
queued-job-count printer-name printer-state
0 Q1 idle
0 Q2 idle
0 Q3 idle
0 Q4 idle
0 Q5 idle