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

scheduler: Set reasons in cupsdSetJobState only if we call finalize_j… #832

Merged
merged 2 commits into from
Nov 27, 2023

Conversation

zdohnal
Copy link
Member

@zdohnal zdohnal commented Nov 23, 2023

…ob later

Before the fix, every successfully printed jobs ended up with 'processing-to-stop-point' as the last reasons message.

Together with #830 fixes #828 .

michaelrsweet
michaelrsweet previously approved these changes Nov 23, 2023
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.

+1.

I just noticed this myself!

@zdohnal
Copy link
Member Author

zdohnal commented Nov 24, 2023

I'll just make one change - we have to be sure that we have 'job' before calling the ippSetString, since we dereference it - I blindly negated the conditions which have to be fulfilled to get to finalize_job() and we shouldn't get here if job is NULL, but just to make sure that it is clear we have to have job there...

Copy link
Member Author

@zdohnal zdohnal left a comment

Choose a reason for hiding this comment

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

I've just use the same condition as we have for calling finalize_job(), so it matches the comment and intention (idk why I did the cond negation previously...) - I had to change it because I realize we should guard against job being NULL there, since we dereference the job.

zdohnal added a commit that referenced this pull request Nov 24, 2023
Introduce a new argument value 'successful' in lpstat to get jobs which completed successfully without introducing a new IPP value for IPP attribute 'which-jobs'

Together with #832 fixes #828 .
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.

+1

@zdohnal zdohnal merged commit 89ccb97 into OpenPrinting:master Nov 27, 2023
3 of 6 checks passed
zdohnal added a commit to zdohnal/cups that referenced this pull request Nov 27, 2023
Before OpenPrinting#832 most successfully finished jobs had incorrect
job state reasons - try to fix them during loading the jobs.
zdohnal added a commit to zdohnal/cups that referenced this pull request Jan 19, 2024
Before OpenPrinting#832 most successfully finished jobs had incorrect
job state reasons - try to fix them during loading the jobs.
zdohnal added a commit to zdohnal/cups that referenced this pull request Jan 19, 2024
Before OpenPrinting#832 most successfully finished jobs had incorrect
job state reasons - try to fix them during loading the jobs.
zdohnal added a commit to zdohnal/cups that referenced this pull request Jan 26, 2024
Before OpenPrinting#832 most successfully finished jobs had incorrect
job state reasons - try to fix them during loading the jobs.
zdohnal added a commit to zdohnal/cups that referenced this pull request Jan 26, 2024
Before OpenPrinting#832 most successfully finished jobs had incorrect
job state reasons - try to fix them during loading the jobs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to get a list of canceled or successful print jobs?
2 participants