Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use "purge-job" instead of "purge-jobs" when canceling a single job #742

Merged
merged 3 commits into from
Jun 27, 2023

Conversation

bmasonrh
Copy link
Contributor

The command "cancel -x " adds "purge-jobs true" to the Cancel-Job operation; however, the correct attribute to use for Cancel-job is "purge-job" (singular), not "purge-jobs" (plural). As a result, job files are not removed from /var/spool/cups when "cancel -x " is executed.

The command "cancel -x <job>" adds "purge-jobs true" to the Cancel-Job
operation; however, the correct attribute to use for Cancel-job is
"purge-job" (singular), not "purge-jobs" (plural).  As a result, job
files are not removed from /var/spool/cups when "cancel -x <job>" is
executed.

This patch resolves the issue by adding "purge-job" when the IPP
operation is Cancel-Job and "purge-jobs" for other IPP operations
(Purge-Jobs, Cancel-Jobs, and Cancel-My-Jobs)
@zdohnal
Copy link
Member

zdohnal commented Jun 26, 2023

@michaelrsweet would you mind looking into it? Only reference I found about purge-jobs/purge-job is that Purge Jobs operation is deprecated http://ftp.pwg.org/pub/pwg/standards/std-ipp20-20151030-5100.12.pdf .

Bryan sent me a link to old pwg email conversation https://www.pwg.org/archives/ipp/2009/016226.html which mentions the attributes, but it looks it is not mention in IPP 2.0+ standard.

@michaelrsweet
Copy link
Member

@zdohnal The "purge-job" attribute is a CUPS extension and has never been standardized. Given that it removes job history, the PWG is not interested in standardizing it (thus the deprecation of Purge-Jobs).

Copy link
Member

@michaelrsweet michaelrsweet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor coding style issue, otherwise LGTM.

systemv/cancel.c Outdated Show resolved Hide resolved
@michaelrsweet michaelrsweet added bug Something isn't working priority-medium labels Jun 26, 2023
@michaelrsweet michaelrsweet added this to the v2.4.x milestone Jun 26, 2023
@michaelrsweet michaelrsweet self-assigned this Jun 26, 2023
@zdohnal zdohnal merged commit c5ad7aa into OpenPrinting:master Jun 27, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority-medium
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants