From c70b7b9fd16540712ad8da2d26d24b3cd7d16d9d Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 21 Jul 2003 12:42:41 +0000 Subject: [PATCH] integrity check function svn path=/trunk/boinc/; revision=1752 --- client/app.C | 5 +- client/client_state.C | 144 ++++++++++++++++++++++++++++++++++++++++++ client/client_state.h | 21 ++++++ doc/boinc_dev.html | 9 +-- doc/build.txt | 37 +---------- doc/index.html | 25 ++++---- doc/old_news.html | 9 +++ lib/countries.C | 2 +- 8 files changed, 191 insertions(+), 61 deletions(-) diff --git a/client/app.C b/client/app.C index 056b3121b6..14ade54375 100644 --- a/client/app.C +++ b/client/app.C @@ -705,9 +705,10 @@ bool ACTIVE_TASK::read_stderr_file() { sprintf(path, "%s%s%s", slot_dir, PATH_SEPARATOR, STDERR_FILE); FILE* f = fopen(path, "r"); if (f) { - n = fread(stderr_file, 1, sizeof(stderr_file), f); + n = fread(stderr_file, 1, sizeof(stderr_file)-1, f); fclose(f); - stderr_file[n-1] = '\0'; + if (n < 0) return false; + stderr_file[n] = '\0'; result->stderr_out += "\n"; result->stderr_out += stderr_file; result->stderr_out += "\n\n"; diff --git a/client/client_state.C b/client/client_state.C index 0633148901..c7071dfc5e 100644 --- a/client/client_state.C +++ b/client/client_state.C @@ -1674,3 +1674,147 @@ int CLIENT_STATE::detach_project(PROJECT* project) { return 0; } + +void CLIENT_STATE::check_project_pointer(PROJECT* p) { + unsigned int i; + for (i=0; ipers_file_xfers.size(); i++) { + if (p == pers_xfers->pers_file_xfers[i]) return; + } + assert(0); +} +void CLIENT_STATE::check_file_xfer_pointer(FILE_XFER* p) { + unsigned int i; + for (i=0; ifile_xfers.size(); i++) { + if (p == file_xfers->file_xfers[i]) return; + } + assert(0); +} + +void CLIENT_STATE::check_app(APP& p) { + check_project_pointer(p.project); +} + +void CLIENT_STATE::check_file_info(FILE_INFO& p) { + if (p.pers_file_xfer) check_pers_file_xfer_pointer(p.pers_file_xfer); + if (p.result) check_result_pointer(p.result); + check_project_pointer(p.project); +} + +void CLIENT_STATE::check_file_ref(FILE_REF& p) { + check_file_info_pointer(p.file_info); +} + +void CLIENT_STATE::check_app_version(APP_VERSION& p) { + unsigned int i; + check_app_pointer(p.app); + check_project_pointer(p.project); + for (i=0; ipers_file_xfers.size(); i++) { + check_pers_file_xfer(*pers_xfers->pers_file_xfers[i]); + } + for (i=0; ifile_xfers.size(); i++) { + check_file_xfer(*file_xfers->file_xfers[i]); + } +} diff --git a/client/client_state.h b/client/client_state.h index 12637e0f46..d4ddb1cbd7 100644 --- a/client/client_state.h +++ b/client/client_state.h @@ -207,6 +207,27 @@ public: WORKUNIT* lookup_workunit(PROJECT*, char*); APP_VERSION* lookup_app_version(APP*, int); ACTIVE_TASK* lookup_active_task_by_result(RESULT*); + + void check_project_pointer(PROJECT*); + void check_app_pointer(APP*); + void check_file_info_pointer(FILE_INFO*); + void check_app_version_pointer(APP_VERSION*); + void check_workunit_pointer(WORKUNIT*); + void check_result_pointer(RESULT*); + void check_pers_file_xfer_pointer(PERS_FILE_XFER*); + void check_file_xfer_pointer(FILE_XFER*); + + void check_app(APP&); + void check_file_info(FILE_INFO&); + void check_file_ref(FILE_REF&); + void check_app_version(APP_VERSION&); + void check_workunit(WORKUNIT&); + void check_result(RESULT&); + void check_active_task(ACTIVE_TASK&); + void check_pers_file_xfer(PERS_FILE_XFER&); + void check_file_xfer(FILE_XFER&); + + void check_all(); }; extern CLIENT_STATE gstate; diff --git a/doc/boinc_dev.html b/doc/boinc_dev.html index 84e5b7eec5..c75b035ee2 100644 --- a/doc/boinc_dev.html +++ b/doc/boinc_dev.html @@ -2,20 +2,13 @@ Implementation and debugging of BOINC

-Note: for legal reasons, the BOINC project has temporarily -been removed from Sourceforge.net and the source code is not available. -We hope to resolve this situation soon. +The BOINC source code is here.

-BOINC is open-source software. If you are an experienced C++ system programmer you may be able to help us maintain and enhance BOINC. In any case, you are welcome to browse the source code and give us feedback.

-Visit http://sf.net/projects/boinc -to download the source code -and to view the list of outstanding bugs and feature requests. -

Before sure that you understand exactly how BOINC is intended to work (for both participants and developers) diff --git a/doc/build.txt b/doc/build.txt index f33f54b352..205ef5f115 100755 --- a/doc/build.txt +++ b/doc/build.txt @@ -52,32 +52,6 @@ Get the source - released distribution from http://boinc.berkeley.edu/ -- CVS: - - CVSROOT=anonymous@cvs.boinc.sourceforge.net:/cvsroot/boinc - authentication: pserver, password=(blank) - - - Command-Line CVS (UNIX/CygWin): - - 1 At command line, enter: - - cvs -d:pserver:anonymous@cvs.boinc.sourceforge.net:/cvsroot/boinc login - - Enter a blank password. - 2 At command line, enter: - - cvs -z3 -d:pserver:anonymous@cvs.boinc.sourceforge.net:/cvsroot/boinc co boinc - - - WinCVS - - 1 Menu item Create->Checkout module - 2 Under General Tab, set CVSROOT to "anonymous@cvs.boinc.sourceforge.net:/cvsroot/boinc" - 3 Under General Tab, Set authentication to "'passwd' file on the cvs server" - 4 Under Checkout settings tab, set module name to "boinc" - 5 Under Checkout settings tab, checkout location to "C:\", click OK - - - ------------------------------------------------------------------------- Setup Build Environments @@ -118,16 +92,7 @@ Macintosh Build Source Release -0 Get latest source using CVS - - 0.1 At command line, enter: - - cvs -d:pserver:anonymous@cvs.boinc.sourceforge.net:/cvsroot/boinc login - - Enter a blank password. - 0.2 At command line, enter: - - cvs -z3 -d:pserver:anonymous@cvs.boinc.sourceforge.net:/cvsroot/boinc co boinc +0 Get latest source 1 Make source distributions (.tar.gz, .tar.bz2, .zip) diff --git a/doc/index.html b/doc/index.html index 8e3f5c647c..18607a1e1a 100644 --- a/doc/index.html +++ b/doc/index.html @@ -1,4 +1,6 @@ Berkeley Open Infrastructure for Network Computing (BOINC) + +
@@ -62,17 +64,20 @@ Help debug and enhance the BOINC software. Contact us

-

Status and news

+July 23, 2003 +
+The BOINC source code is available again, +under a new public license. +Version 1.05 incorporates bug fixes and new features, +including the ability to add your own graphics to the screensaver. +The beta test has been resumed, and the scheduling server and +database have been moved to a new machine. +

June 10, 2003
XML based statistics for @@ -108,13 +113,5 @@ We hope to resolve this issue soon. We are preparing a BOINC-based version of SETI@home. See a preview of the graphics.

-March 25, 2003 -
-Non-English -language.ini files are available. -Preferences include time-of-day restrictions. -Core client and applications communicate via shared memory and signals -rather than files, reducing disk traffic. -

Archived news
diff --git a/doc/old_news.html b/doc/old_news.html index 132798427d..3f86940837 100644 --- a/doc/old_news.html +++ b/doc/old_news.html @@ -1,3 +1,12 @@ + +March 25, 2003 +
+Non-English +language.ini files are available. +Preferences include time-of-day restrictions. +Core client and applications communicate via shared memory and signals +rather than files, reducing disk traffic. +

March 19, 2003
New account parameters and preferences: URL, limit number of processors, diff --git a/lib/countries.C b/lib/countries.C index 7f0d04ed20..f98d7b073d 100644 --- a/lib/countries.C +++ b/lib/countries.C @@ -184,6 +184,7 @@ char *countries[NUM_COUNTRIES] = { "Sao Tome and Principe", "Saudi Arabia", "Senegal", + "Serbia and Montenegro", "Seychelles", "Sierra Leone", "Singapore", @@ -227,7 +228,6 @@ char *countries[NUM_COUNTRIES] = { "West Bank", "Western Sahara", "Yemen", - "Yugoslavia", "Zambia", "Zimbabwe" };