*** empty log message ***

svn path=/trunk/boinc/; revision=10057
This commit is contained in:
David Anderson 2006-04-28 18:31:32 +00:00
parent 527f0a4852
commit a9ebba7ca1
4 changed files with 71 additions and 41 deletions

View File

@ -4275,3 +4275,14 @@ David 28 Apr 2006
app_start.C
cs_apps.C
cs_files.C
David 28 Apr 2006
- back end: handle <generated_locally/> in WU file infos.
There are for input files that are generated by the app.
We don't need to generate MD5, list URLs, etc.
- user web: enclose scheduler list in comments (from Roberto Virga)
html/user/
sample_index.php
tools/
backend_lib.C

View File

@ -182,6 +182,7 @@ show_name("Peter Smithson");
show_name("Christian S&oslash;ttrup");
show_name("Michela Taufer");
show_name("Frank S. Thomas");
show_name("Roberto Virga");
show_name("Mathias Walter");
show_name("Rom Walton");
show_name("Oliver Wang");

View File

@ -114,11 +114,15 @@ echo "
</td>
</tr></table>
<font color=ffffff>
<!--
";
include 'schedulers.txt';
echo "</font>\n";
echo "
-->
</font>
";
if ($caching) {
page_tail_main(true);

View File

@ -158,7 +158,6 @@ static void write_md5_info(
return;
}
// process WU template
//
static int process_wu_template(
@ -180,6 +179,7 @@ static int process_wu_template(
out = "";
for (p=strtok(tmplate, "\n"); p; p=strtok(0, "\n")) {
if (match_tag(p, "<file_info>")) {
bool generated_locally = false;
file_number = -1;
out += "<file_info>\n";
while (1) {
@ -187,58 +187,72 @@ static int process_wu_template(
if (!p) break;
if (parse_int(p, "<number>", file_number)) {
continue;
} else if (parse_bool(p, "generated_locally", generated_locally)) {
continue;
} else if (match_tag(p, "</file_info>")) {
if (file_number < 0) {
fprintf(stderr, "No file number found\n");
return ERR_XML_PARSE;
}
if (file_number >= ninfiles) {
fprintf(stderr, "Too few input files given; need at least %d\n", file_number+1);
fprintf(stderr,
"Too few input files given; need at least %d\n",
file_number+1
);
return ERR_XML_PARSE;
}
dir_hier_path(
infiles[file_number], config.download_dir,
config.uldl_dir_fanout, path, true
);
// if file isn't found in hierarchy,
// look for it at top level and copy
//
if (!boinc_file_exists(path)) {
sprintf(top_download_path,
"%s/%s",config.download_dir,
if (generated_locally) {
sprintf(buf,
" <name>%s</name>\n"
" <generated_locally/>\n"
"</file_info>]n",
infiles[file_number]
);
boinc_copy(top_download_path, path);
}
} else {
dir_hier_path(
infiles[file_number], config.download_dir,
config.uldl_dir_fanout, path, true
);
if (!config.cache_md5_info || !got_md5_info(path, md5, &nbytes)) {
retval = md5_file(path, md5, nbytes);
if (retval) {
fprintf(stderr, "process_wu_template: md5_file %d\n", retval);
return retval;
// if file isn't found in hierarchy,
// look for it at top level and copy
//
if (!boinc_file_exists(path)) {
sprintf(top_download_path,
"%s/%s",config.download_dir,
infiles[file_number]
);
boinc_copy(top_download_path, path);
}
else if (config.cache_md5_info) {
write_md5_info(path, md5, nbytes);
}
}
dir_hier_url(
infiles[file_number], config.download_url,
config.uldl_dir_fanout, url
);
sprintf(buf,
" <name>%s</name>\n"
" <url>%s</url>\n"
" <md5_cksum>%s</md5_cksum>\n"
" <nbytes>%.0f</nbytes>\n"
"</file_info>\n",
infiles[file_number],
url,
md5,
nbytes
);
if (!config.cache_md5_info || !got_md5_info(path, md5, &nbytes)) {
retval = md5_file(path, md5, nbytes);
if (retval) {
fprintf(stderr, "process_wu_template: md5_file %d\n", retval);
return retval;
}
else if (config.cache_md5_info) {
write_md5_info(path, md5, nbytes);
}
}
dir_hier_url(
infiles[file_number], config.download_url,
config.uldl_dir_fanout, url
);
sprintf(buf,
" <name>%s</name>\n"
" <url>%s</url>\n"
" <md5_cksum>%s</md5_cksum>\n"
" <nbytes>%.0f</nbytes>\n"
"</file_info>\n",
infiles[file_number],
url,
md5,
nbytes
);
}
out += buf;
break;
} else {