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

changing priority of pending jobs has no effect #1811

Closed
michaelrsweet opened this issue Jun 29, 2006 · 2 comments
Closed

changing priority of pending jobs has no effect #1811

michaelrsweet opened this issue Jun 29, 2006 · 2 comments

Comments

@michaelrsweet
Copy link
Collaborator

Version: 1.2.1
CUPS.org User: dkastens.uos

When I change the priority of a pending job with the command "lp -i -q " (from 50 to 70 for example) the ranking of the queued jobs doesn't change.
cups-1.2.1-1 on RedHat EL AS 4.

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Actually, the problem seems to have been that the scheduler was sorting priority in ascending rather than descending order, so smaller values would cause the job to be printed first. The attached patch fixes things...

@michaelrsweet
Copy link
Collaborator Author

"str1811.patch":

Index: job.c

--- job.c (revision 5711)
+++ job.c (working copy)
@@ -1753,8 +1753,8 @@
int diff; /* Difference */

  • if ((diff = ((cupsd_job_t *)first)->priority -
  •          ((cupsd_job_t *)second)->priority) != 0)
    
  • if ((diff = ((cupsd_job_t *)second)->priority -
  •          ((cupsd_job_t *)first)->priority) != 0)
    
    return (diff);
    else
    return (((cupsd_job_t *)first)->id - ((cupsd_job_t *)second)->id);

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