-
Notifications
You must be signed in to change notification settings - Fork 467
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
job-completed event has job-state 'job-printing' #1955
Comments
CUPS.org User: jlovell Got a little more testing in... cupsdSetPrinterReasons() is not generating a printer-state-changed event. Neither is accept/reject. In printers.c maybe these two lines should be reversed so the reason is part of the printer-state-changed event:    cupsdSetPrinterState(p, IPP_PRINTER_STOPPED, 0); And a similar construct in job.c:  cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, job->printer, job,  cupsdCancelJob(job, 0); Thanks! |
CUPS.org User: mike I think the attached patch should fix things up properly. Please let me know if you see any other issues... |
"str1955.patch": Index: ipp.c--- ipp.c (revision 5931)
- "Job canceled by "%s".", username);cupsdCancelJob(job, 0); Index: printers.c--- printers.c (revision 5930)
cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdCancelJob: id = %d", job->id);
if (job->state_value == IPP_JOB_PROCESSING) @@ -173,6 +176,13 @@ set_time(job, "time-at-completed");
- purge ? "Job purged." : "Job canceled.");
|
Version: 1.2-current
CUPS.org User: jlovell
The job-completed event has the job-state 'job-printing' rather than
'completed'. rfc3995, section 5.3.3.4.3 says:
job-completed':Â REQUIRED - the job has reached one of the
     completed states, i.e., the value of the job's "job-state"
     attribute has changed to: 'completed', 'aborted', or
     'canceled'.
With a little testsubscriptions tool I see:
job-created: ("Job created.")
printer-state-changed: processing ("Printer "test" state changed.")
job-state: job-printing ("Job #38 started.")
job-completed: job-printing ("Job completed successfully.")
printer-state-changed: idle ("Printer "test" state changed.")
Seperatly, when a backend exits with an error the job-completed event is missing:
job-created: ("Job created.")
printer-state-changed: processing ("Printer "test" state changed.")
job-state: job-printing ("Job #39 started.")
printer-state-changed: stopped ("Printer "test" state changed.")
I hope to do more event testing on Tuesday...
Thanks!
The text was updated successfully, but these errors were encountered: