From 6144b0aaee56c5d8bf4747f26ab52ab9838a7768 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 27 Jul 2017 23:36:32 -0700 Subject: [PATCH] scheduler: fix crashing bug in keyword scheduling code --- doc/projects.php | 4 ++-- sched/sched_score.cpp | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/projects.php b/doc/projects.php index be7854fa53..58d9352913 100644 --- a/doc/projects.php +++ b/doc/projects.php @@ -136,9 +136,9 @@ function ordered_display($areas, $sort) { if (array_key_exists(5, $p) && $p[5]) { $img= ""; } - $arg = "$img Sponsor: $p[2]
Area: $p[3]
Goal: $p[4]"; + $arg = "$img Goal: $p[4]
Sponsor: $p[2]
Area: $p[3]"; $arg = addslashes($arg); - $x = "$p[0]"; + $x = "$p[0]"; $home = $p[2]; $area = $p['area']; $spec_area = $p[3]; diff --git a/sched/sched_score.cpp b/sched/sched_score.cpp index 91c14697fa..68596a87a9 100644 --- a/sched/sched_score.cpp +++ b/sched/sched_score.cpp @@ -328,7 +328,9 @@ void send_work_score_type(int rt) { // (since otherwise feeder might overwrite it) // wu_result.state = WR_STATE_EMPTY; - keyword_sched_remove_job(job.index); + if (config.keyword_sched) { + keyword_sched_remove_job(job.index); + } // reread result from DB, make sure it's still unsent // TODO: from here to end of add_result_to_reply()