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

Handling of job-hold-until="weekend" is wrong #3025

Closed
michaelrsweet opened this issue Nov 28, 2008 · 2 comments
Closed

Handling of job-hold-until="weekend" is wrong #3025

michaelrsweet opened this issue Nov 28, 2008 · 2 comments
Milestone

Comments

@michaelrsweet
Copy link
Collaborator

Version: 1.3.9
CUPS.org User: twaugh.redhat

Jobs held until "weekend" are only held until the next day that is not Sunday.

Patch attached.

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Fixed in Subversion repository.

@michaelrsweet
Copy link
Collaborator Author

"0001-Fixed-handling-of-job-until-until-weekend.patch":

From 72f62a1ace0d43c6c4cde3b9fc242e93b208993e Mon Sep 17 00:00:00 2001
From: Tim Waugh twaugh@redhat.com
Date: Fri, 28 Nov 2008 14:48:13 +0000
Subject: [PATCH] Fixed handling of job-until-until="weekend".


scheduler/job.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scheduler/job.c b/scheduler/job.c
index 1d409c2..92e1f84 100644
--- a/scheduler/job.c
+++ b/scheduler/job.c
@@ -1623,7 +1623,7 @@ cupsdSetJobHoldUntil(cupsd_job_t job, / I - Job */
curtime = time(NULL);
curdate = localtime(&curtime);

  • if (curdate->tm_wday || curdate->tm_wday == 6)
  • if (curdate->tm_wday == 0 || curdate->tm_wday == 6)
    job->hold_until = curtime;
    else
    job->hold_until = curtime +
    --
    1.5.6.5

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