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

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

Comments

Projects
None yet
1 participant
Collaborator

michaelrsweet commented Nov 28, 2008

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.

Collaborator

michaelrsweet commented Dec 5, 2008

CUPS.org User: mike

Fixed in Subversion repository.

Collaborator

michaelrsweet commented Dec 5, 2008

"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

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