diff --git a/checkin_notes b/checkin_notes index 87acb05207..6ac914068a 100644 --- a/checkin_notes +++ b/checkin_notes @@ -6971,3 +6971,13 @@ Rom 21 Aug 2008 / configure.ac version.h + +David 21 Aug 2008 + - validator: add a global variable WORKUNIT* g_wup; + that points to the workunit being processed; + you can use this in your init_result(), compare_result() etc. + if you need it. + + sched/ + main.C + validator.C,h diff --git a/sched/main.h b/sched/main.h index c7834dbc7b..2683c56d03 100644 --- a/sched/main.h +++ b/sched/main.h @@ -57,7 +57,6 @@ #define DELAY_MAX (2*86400) // maximum delay request -extern SCHED_CONFIG config; extern GUI_URLS gui_urls; extern PROJECT_FILES project_files; extern key_t sema_key; diff --git a/sched/validator.C b/sched/validator.C index 7dfcca5605..704b3dc59a 100644 --- a/sched/validator.C +++ b/sched/validator.C @@ -50,6 +50,7 @@ using namespace std; #include "sched_config.h" #include "sched_util.h" #include "sched_msgs.h" +#include "validator.h" #include "validate_util.h" #define LOCKFILE "validate.out" @@ -87,6 +88,7 @@ bool grant_claimed_credit = false; bool update_credited_job = false; bool credit_from_wu = false; bool simulation = false; +WORKUNIT* g_wup; void signal_handler(int) { log_messages.printf(MSG_NORMAL, "Signaled by simulator\n"); @@ -283,6 +285,7 @@ int handle_wu( unsigned int i; WORKUNIT& wu = items[0].wu; + g_wup = &wu; if (wu.canonical_resultid) { log_messages.printf(MSG_NORMAL, diff --git a/sched/validator.h b/sched/validator.h index 8295b0038b..c967161c77 100644 --- a/sched/validator.h +++ b/sched/validator.h @@ -17,8 +17,13 @@ #include "sched_config.h" -extern SCHED_CONFIG config; - extern double max_granted_credit; + // the -max_granted_credit cmdline arg, or 0 extern double max_claimed_credit; + // the -max_claimed_credit cmdline arg, or 0 extern bool grant_claimed_credit; + // the -grant_claimed_credit cmdline arg, or false + +extern WORKUNIT* g_wup; + // A pointer to the WU currently being processed; + // you can use this in your init_result() etc. functions