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

Comments

@michaelrsweet
Copy link
Collaborator

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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

CUPS.org User: mike

Fixed in Subversion repository.

@michaelrsweet
Copy link
Collaborator Author

"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",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant