From d45aa6b6e71858bd008fcd18428c3b3915c464d0 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 29 Aug 2002 04:08:40 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=389 --- client/http.C | 6 +++++- client/pers_file_xfer.C | 4 ++-- html/user/index.html | 2 +- sched/handle_request.C | 14 +++++++++++--- sched/main.C | 7 +++++-- sched/show_shmem.C | 5 ++++- test/test_uc_win.php | 9 +++++++-- 7 files changed, 35 insertions(+), 12 deletions(-) diff --git a/client/http.C b/client/http.C index 22e92cb931..2125de88e6 100644 --- a/client/http.C +++ b/client/http.C @@ -481,7 +481,11 @@ bool HTTP_OP_SET::poll() { htp->http_op_retval = 0; break; case HTTP_OP_POST: - unlink(htp->outfile); + retval = unlink(htp->outfile); + if (retval) { + printf("ERROR: unlink %d\n", retval); + } + // fall through case HTTP_OP_GET: htp->http_op_state = HTTP_STATE_REPLY_BODY; diff --git a/client/pers_file_xfer.C b/client/pers_file_xfer.C index 0fe48cd225..9a8ff49c07 100644 --- a/client/pers_file_xfer.C +++ b/client/pers_file_xfer.C @@ -86,8 +86,8 @@ bool PERS_FILE_XFER::start_xfer() { fxp = file_xfer; if (log_flags.file_xfer) { printf( - "started %s of %s\n", - (is_upload ? "upload" : "download"), fip->get_url() + "started %s of %s to %s\n", + (is_upload ? "upload" : "download"), fip->name, fip->get_url() ); } return true; diff --git a/html/user/index.html b/html/user/index.html index c241140af9..7b3c70081d 100644 --- a/html/user/index.html +++ b/html/user/index.html @@ -13,6 +13,6 @@ create an account, then download the BOINC client.
  • Teams
  • diff --git a/sched/handle_request.C b/sched/handle_request.C index 965b26e7cf..8d761ecad1 100644 --- a/sched/handle_request.C +++ b/sched/handle_request.C @@ -31,6 +31,7 @@ #define MIN_SECONDS_TO_SEND 0 #define MAX_SECONDS_TO_SEND 2419200 //4 weeks +#define MAX_WUS_TO_SEND 2 // return true if the WU can be executed on the host // @@ -197,7 +198,7 @@ int update_host_record(SCHEDULER_REQUEST& sreq, HOST& host) { host.n_bwdown = sreq.host.n_bwdown; retval = db_host_update(host); if (retval) { - fprintf(stderr, "db_host_update: %d\n", retval); + fprintf(stderr, "sched (%s): db_host_update: %d\n", BOINC_USER, retval); } return 0; } @@ -237,7 +238,10 @@ int handle_results(SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply) { printf("can't find result %s\n", rp->name); } else { if (result.state != RESULT_STATE_IN_PROGRESS) { - fprintf(stderr, "got unexpected result for %s\n", rp->name); + fprintf(stderr, + "got unexpected result for %s: state is %d\n", + rp->name, result.state + ); continue; } @@ -312,7 +316,6 @@ int send_work( if (retval) continue; reply.insert_result(result); seconds_to_fill -= (int)estimate_duration(wu, reply.host); - nresults++; result.state = RESULT_STATE_IN_PROGRESS; result.hostid = reply.host.id; @@ -321,6 +324,9 @@ int send_work( wu.nresults_unsent--; db_workunit_update(wu); + + nresults++; + if (nresults == MAX_WUS_TO_SEND) break; } #if 0 @@ -376,6 +382,7 @@ void send_code_sign_key( if (sreq.code_sign_key) { if (strcmp(sreq.code_sign_key, code_sign_key)) { + fprintf(stderr, "received old code sign key\n"); // look for a signature file // for (i=0; ; i++) { @@ -406,6 +413,7 @@ void send_code_sign_key( } } } else { + fprintf(stderr, "%d: didn't get code sign key, sending one\n", getpid()); reply.code_sign_key = strdup(code_sign_key); } } diff --git a/sched/main.C b/sched/main.C index 8b5292c06a..43c8baee51 100644 --- a/sched/main.C +++ b/sched/main.C @@ -29,10 +29,13 @@ #include "handle_request.h" #include "main.h" +#if 0 #define REQ_FILE_PREFIX "/tmp/boinc_req_" #define REPLY_FILE_PREFIX "/tmp/boinc_reply_" -//#define REQ_FILE_PREFIX "/disks/milkyway/a/users/anderson/boinc_cvs/boinc/sched/boinc_req_" -//#define REPLY_FILE_PREFIX "/disks/milkyway/a/users/anderson/boinc_cvs/boinc/sched/boinc_reply_" +#else +#define REQ_FILE_PREFIX "/disks/milkyway/a/users/anderson/boinc_cvs/boinc/sched/boinc_req_" +#define REPLY_FILE_PREFIX "/disks/milkyway/a/users/anderson/boinc_cvs/boinc/sched/boinc_reply_" +#endif PROJECT gproject; diff --git a/sched/show_shmem.C b/sched/show_shmem.C index b33aa8b54a..e20c84de3d 100644 --- a/sched/show_shmem.C +++ b/sched/show_shmem.C @@ -5,7 +5,7 @@ int main() { SCHED_SHMEM* ssp; - int retval; + int retval, i; void* p; retval = attach_shmem(BOINC_SHMEM_KEY, &p); @@ -16,4 +16,7 @@ int main() { ssp = (SCHED_SHMEM*)p; retval = ssp->verify(); printf("ready: %d\n", ssp->ready); + for (i=0; imax_wu_results; i++) { + printf("%d. %s\n", i, ssp->wu_results[i].present?"present":"absent"); + } } diff --git a/test/test_uc_win.php b/test/test_uc_win.php index 88d3f4bdab..2b61336489 100644 --- a/test/test_uc_win.php +++ b/test/test_uc_win.php @@ -7,8 +7,13 @@ check_env_vars(); clear_db(); - clear_data_dirs(); - create_keys(); + if (true) { + clear_server_dirs(false); + } else { + clear_server_dirs(true); + create_keys(); + } + clear_client_dirs(); init_client_dirs("prefs1.xml"); copy_to_download_dir("input"); add_project("Test Project");