From a9ebba7ca18e8db7607175188cdac6e8b3736e2d Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 28 Apr 2006 18:31:32 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=10057 --- checkin_notes | 11 +++++ doc/contact.php | 1 + html/user/sample_index.php | 6 ++- tools/backend_lib.C | 94 ++++++++++++++++++++++---------------- 4 files changed, 71 insertions(+), 41 deletions(-) diff --git a/checkin_notes b/checkin_notes index 72805111c6..f382c850a6 100755 --- a/checkin_notes +++ b/checkin_notes @@ -4275,3 +4275,14 @@ David 28 Apr 2006 app_start.C cs_apps.C cs_files.C + +David 28 Apr 2006 + - back end: handle 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 diff --git a/doc/contact.php b/doc/contact.php index ff15758b60..2d9e36443d 100644 --- a/doc/contact.php +++ b/doc/contact.php @@ -182,6 +182,7 @@ show_name("Peter Smithson"); show_name("Christian Sø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"); diff --git a/html/user/sample_index.php b/html/user/sample_index.php index 92cca8ab9b..60710cdf17 100644 --- a/html/user/sample_index.php +++ b/html/user/sample_index.php @@ -114,11 +114,15 @@ echo " + + +"; if ($caching) { page_tail_main(true); diff --git a/tools/backend_lib.C b/tools/backend_lib.C index 79bceb9c7e..ad527250de 100644 --- a/tools/backend_lib.C +++ b/tools/backend_lib.C @@ -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, "")) { + bool generated_locally = false; file_number = -1; out += "\n"; while (1) { @@ -187,58 +187,72 @@ static int process_wu_template( if (!p) break; if (parse_int(p, "", file_number)) { continue; + } else if (parse_bool(p, "generated_locally", generated_locally)) { + continue; } else if (match_tag(p, "")) { 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, + " %s\n" + " \n" + "]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, - " %s\n" - " %s\n" - " %s\n" - " %.0f\n" - "\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, + " %s\n" + " %s\n" + " %s\n" + " %.0f\n" + "\n", + infiles[file_number], + url, + md5, + nbytes + ); + } out += buf; break; } else {