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

ipp backend stops watching remote job too early #2352

Closed
michaelrsweet opened this issue Apr 19, 2007 · 4 comments
Closed

ipp backend stops watching remote job too early #2352

michaelrsweet opened this issue Apr 19, 2007 · 4 comments
Labels
Milestone

Comments

@michaelrsweet
Copy link
Collaborator

@michaelrsweet michaelrsweet commented Apr 19, 2007

Version: 1.2.10
CUPS.org User: twaugh.redhat

The ipp backend monitors the progress of the remote job until:

job_state->values[0].integer > IPP_JOB_PROCESSING ||
job_state->values[0].integer == IPP_JOB_HELD

Unfortunately that means that applications trying to show the user what jobs they have (e.g. lpstat -o) don't show
a) remote IPP jobs currently held
b) remote IPP jobs currently stopped -- e.g. due to device error

..and they have no way to discover what happened to their job without knowing the network topology.

I think the condition should be changed to:

job_state->values[0].integer > IPP_JOB_STOPPED

What do you think?

@michaelrsweet

This comment has been minimized.

Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Apr 19, 2007

CUPS.org User: twaugh.redhat

I actually would go further, and suggest that the ipp backend act as a proxy for the remote IPP job, stopping when it stops, restarting it when restarted, etc.

@michaelrsweet

This comment has been minimized.

Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Apr 30, 2007

CUPS.org User: mike

It can't stop or restart on its own - the scheduler would need to do that, and that would require substantial changes to the code (without, IMHO, much benefit).

Stopping only after the job is completed (anything other than "stopped") sounds reasonable, however, so I will go ahead and make that change...

@michaelrsweet

This comment has been minimized.

Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Apr 30, 2007

CUPS.org User: mike

Fixed in Subversion repository.

@michaelrsweet

This comment has been minimized.

Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Apr 30, 2007

"str2352.patch":

Index: ipp.c

--- ipp.c (revision 6481)
+++ ipp.c (working copy)
@@ -1159,8 +1159,7 @@
* Stop polling if the job is finished or pending-held...
*/

  •      if (job_state->values[0].integer > IPP_JOB_PROCESSING ||
    
  •     job_state->values[0].integer == IPP_JOB_HELD)
    
  •      if (job_state->values[0].integer > IPP_JOB_STOPPED)
    
    {
    if ((job_sheets = ippFindAttribute(response,
    "job-media-sheets-completed",
@michaelrsweet 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.