diff --git a/checkin_notes b/checkin_notes
index e07829848c..ead28ea803 100755
--- a/checkin_notes
+++ b/checkin_notes
@@ -17717,3 +17717,18 @@ David 24 Sept 2004
lib/
filesys.C
+
+David 24 Sept 2004
+ - added a option to config.xml.
+ If set, no upload certificates will be generated for results.
+ This will make the transitioner run faster.
+ If you use this, you must set
+ immediately, and leave it on for a couple of weeks
+ even after start generating upload certificates again.
+
+ sched/
+ sched_config.C,h
+ transitioner.C
+ tools/
+ backend_lib.C,h
+ process_result_template.C
diff --git a/sched/sched_config.C b/sched/sched_config.C
index 395744ed05..d3caa060cb 100644
--- a/sched/sched_config.C
+++ b/sched/sched_config.C
@@ -70,6 +70,9 @@ int SCHED_CONFIG::parse(char* buf) {
if (match_tag(buf, "")) {
ignore_upload_certificates = true;
}
+ if (match_tag(buf, "")) {
+ dont_generate_upload_certificates = true;
+ }
#if 0
if (match_tag(buf, "")) {
deletion_policy_priority = true;
diff --git a/sched/sched_config.h b/sched/sched_config.h
index 898b21cebe..21e38b074b 100644
--- a/sched/sched_config.h
+++ b/sched/sched_config.h
@@ -46,6 +46,7 @@ public:
bool homogeneous_redundancy;
bool locality_scheduling;
bool ignore_upload_certificates;
+ bool dont_generate_upload_certificates;
bool enforce_delay_bound;
#if 0
bool deletion_policy_priority;
diff --git a/sched/transitioner.C b/sched/transitioner.C
index cc6bff3a17..9698e138fd 100644
--- a/sched/transitioner.C
+++ b/sched/transitioner.C
@@ -254,7 +254,7 @@ int handle_wu(
#ifdef BATCH_INSERT
retval = create_result(
wu_item.id, wu_item.appid, wu_item.name,
- rtfpath, suffix, key, config.upload_url, value_buf
+ rtfpath, suffix, key, config, value_buf
);
if (retval) {
log_messages.printf(
@@ -273,7 +273,7 @@ int handle_wu(
#else
retval = create_result(
wu_item.id, wu_item.appid, wu_item.name,
- rtfpath, suffix, key, config.upload_url, 0
+ rtfpath, suffix, key, config, 0
);
if (retval) {
log_messages.printf(
diff --git a/tools/backend_lib.C b/tools/backend_lib.C
index 0423e836d3..656113eb0a 100644
--- a/tools/backend_lib.C
+++ b/tools/backend_lib.C
@@ -235,7 +235,7 @@ int create_result(
char* result_template_filename,
char* result_name_suffix,
R_RSA_PRIVATE_KEY& key,
- char* upload_url,
+ SCHED_CONFIG& config,
char* query_string
// if nonzero, write value list here; else do insert
) {
@@ -262,7 +262,7 @@ int create_result(
result_template,
key,
base_outfile_name,
- upload_url
+ config
);
if (strlen(result_template) > sizeof(result.xml_doc_in)-1) {
fprintf(stderr,
diff --git a/tools/backend_lib.h b/tools/backend_lib.h
index da87e4ce94..4f2ef700fe 100644
--- a/tools/backend_lib.h
+++ b/tools/backend_lib.h
@@ -31,7 +31,7 @@ extern int process_result_template(
char* result_template,
R_RSA_PRIVATE_KEY& key,
char* base_filename,
- char* upload_url
+ SCHED_CONFIG& config
);
extern int read_file(FILE*, char* buf);
@@ -46,7 +46,7 @@ extern int create_result(
char* result_template_filename,
char* suffix,
R_RSA_PRIVATE_KEY& key,
- char* upload_url,
+ SCHED_CONFIG& config,
char* query_string=0
);
diff --git a/tools/process_result_template.C b/tools/process_result_template.C
index 97b9a9d3c2..c2eb5f4b8c 100644
--- a/tools/process_result_template.C
+++ b/tools/process_result_template.C
@@ -24,6 +24,7 @@
#include "boinc_db.h"
#include "error_numbers.h"
#include "parse.h"
+#include "sched_config.h"
#include "crypt.h"
#ifdef _USING_FCGI_
@@ -120,12 +121,12 @@ int process_result_template(
char* result_template,
R_RSA_PRIVATE_KEY& key,
char* base_filename,
- char* upload_url
+ SCHED_CONFIG& config
) {
char* p,*q;
char temp[LARGE_BLOB_SIZE];
char num;
- int i;
+ int i, retval;
while (1) {
p = strstr(result_template, OUTFILE_MACRO);
@@ -142,11 +143,15 @@ int process_result_template(
p = strstr(result_template, UPLOAD_URL_MACRO);
if (p) {
strcpy(temp, p+strlen(UPLOAD_URL_MACRO));
- strcpy(p, upload_url);
+ strcpy(p, config.upload_url);
strcat(p, temp);
continue;
}
break;
}
- return add_signatures(result_template, key);
+ if (!config.dont_generate_upload_certificates) {
+ retval = add_signatures(result_template, key);
+ if (retval) return retval;
+ }
+ return 0;
}