diff --git a/checkin_notes b/checkin_notes
index 44aa48a3bf..69da77f3cd 100755
--- a/checkin_notes
+++ b/checkin_notes
@@ -3691,3 +3691,44 @@ David Mar 5 2003
sched/
Makefile.in
server_types.C
+
+David Mar 6 2003
+ - new show_message() conventions (not fully implemented):
+ - all error conditions should call show_message() with MSG_ERROR
+ - all log writes should use show_message() with MSG_INFO
+ TODO: change Win implementation of show_message() to
+ write to window AND to file (stderr.txt or stdout.txt)
+ - messages are now timestamped and show project name
+ - use start_table() and row2() more uniformly in user HTML
+ - user HTML: show message if can't connect to DB
+ - standardize terminology in user HTML: "general prefs",
+ "default computer location", etc.
+
+ client/
+ client_state.C
+ cs_scheduler.C
+ main.C
+ message.h
+ scheduler_op.C
+ doc/
+ prefs.html
+ html_user/
+ add_venue_form.php
+ bug_report_form.php
+ create_account*.php
+ db.inc
+ edit_email_form.php
+ edit_user_info_form.php
+ index.php
+ login*.php
+ prefs.inc
+ prefs_edit_form.php
+ show_user.php
+ team_create_form.php
+ top_hosts.php
+ user.inc
+ util.inc
+ lib/
+ util.C,h
+ sched/
+ *.C
diff --git a/client/client_state.C b/client/client_state.C
index 741deb5ee0..c16b5ef01a 100644
--- a/client/client_state.C
+++ b/client/client_state.C
@@ -140,7 +140,7 @@ int CLIENT_STATE::init() {
//
retval = global_prefs.parse_file(host_venue);
if (retval) {
- printf("No global preferences file; will use defaults.\n");
+ printf("Using default preferences.\n");
}
install_global_prefs();
@@ -152,7 +152,7 @@ int CLIENT_STATE::init() {
//
if (gstate.should_run_time_tests()) {
time_tests_start = time(0);
- show_message(NULL, "Running time tests", "low");
+ show_message(NULL, "Running CPU benchmarks", MSG_INFO);
#ifdef _WIN32
time_tests_handle = CreateThread(
NULL, 0, win_time_tests, NULL, 0, &time_tests_id
@@ -279,7 +279,7 @@ int CLIENT_STATE::check_time_tests() {
GetExitCodeThread(time_tests_handle, &exit_code);
if(exit_code == STILL_ACTIVE) {
if(time(NULL) > time_tests_start + MAX_TIME_TESTS_SECONDS) {
- show_message(NULL, "Time tests timed out, using default values", "low");
+ show_message(NULL, "CPU benchmarks timed out, using default values", MSG_ERROR);
TerminateThread(time_tests_handle, 0);
CloseHandle(time_tests_handle);
host_info.p_fpops = 1e9;
@@ -297,7 +297,7 @@ int CLIENT_STATE::check_time_tests() {
retval = waitpid(time_tests_id, &exit_code, WNOHANG);
if(retval == 0) {
if((unsigned int)time(NULL) > time_tests_start + MAX_TIME_TESTS_SECONDS) {
- show_message(NULL, "Time tests timed out, using default values", "low");
+ show_message(NULL, "CPU benchmarks timed out, using default values", MSG_ERROR);
kill(time_tests_id, SIGKILL);
host_info.p_fpops = 1e9;
host_info.p_iops = 1e9;
@@ -310,10 +310,10 @@ int CLIENT_STATE::check_time_tests() {
}
#endif
time_tests_id = 0;
- show_message(NULL, "Time tests complete", "low");
+ show_message(NULL, "CPU benchmarks complete", MSG_INFO);
finfo = fopen(TIME_TESTS_FILE_NAME, "r");
- if(!finfo) {
- show_message(NULL, "Error in time tests file, using default values", "low");
+ if (!finfo) {
+ show_message(NULL, "Can't open CPU benchmark file, using default values", MSG_ERROR);
host_info.p_fpops = 1e9;
host_info.p_iops = 1e9;
host_info.p_membw = 4e9;
diff --git a/client/cs_scheduler.C b/client/cs_scheduler.C
index d9f096dde9..73834dadcd 100644
--- a/client/cs_scheduler.C
+++ b/client/cs_scheduler.C
@@ -350,7 +350,8 @@ int CLIENT_STATE::handle_scheduler_reply(
project->user_expavg_credit = sr.user_expavg_credit;
project->user_create_time = sr.user_create_time;
if (strlen(sr.message)) {
- show_message(project, sr.message, sr.message_priority);
+ int prio = (!strcmp(sr.message_priority, "high"))?MSG_ERROR:MSG_INFO;
+ show_message(project, sr.message, prio);
}
if (sr.request_delay) {
diff --git a/client/main.C b/client/main.C
index d068f91acf..31bfde50a5 100644
--- a/client/main.C
+++ b/client/main.C
@@ -38,11 +38,13 @@
// Display a message to the user.
// Depending on the priority, the message may be more or less obtrusive
//
-void show_message(PROJECT *p, char* message, char* priority) {
- if (!strcmp(priority, "high")) {
- fprintf(stderr, "BOINC core client: %s (priority: %s)\n", message, priority);
- } else {
- printf("BOINC core client: %s (priority: %s)\n", message, priority);
+void show_message(PROJECT *p, char* message, int priority) {
+ const char* proj = p?p->project_name:"BOINC";
+ switch (priority) {
+ case MSG_ERROR:
+ fprintf(stderr, "%s [%s] %s", timestamp(), proj, message);
+ default:
+ printf("%s [%s] %s", timestamp(), proj, message);
}
}
diff --git a/client/message.h b/client/message.h
index c0f83d4287..6449ce5242 100644
--- a/client/message.h
+++ b/client/message.h
@@ -1,4 +1,11 @@
-// show a message.
-// Implemented in different ways in cmdline client versus GUI client
-//
-extern void show_message(PROJECT *p, char* message, char* priority);
+// Show a message, preceded by timestamp and project name
+// priorities:
+
+#define MSG_INFO 1
+ // cmdline: write to stdout
+ // GUI: write to msg window
+#define MSG_ERROR 2
+ // cmdline: write to stderr
+ // GUI: write to msg window in bold or red
+
+extern void show_message(PROJECT *p, char* message, int priority);
diff --git a/client/scheduler_op.C b/client/scheduler_op.C
index 5ac1b98f76..8ccbc3e19b 100644
--- a/client/scheduler_op.C
+++ b/client/scheduler_op.C
@@ -351,7 +351,7 @@ bool SCHEDULER_OP::poll() {
"Could not contact %s. Make sure this is the correct project URL.",
err_url
);
- show_message(project, err_msg, "high");
+ show_message(project, err_msg, MSG_ERROR);
project->master_fetch_failures++;
backoff(project, err_msg);
}
diff --git a/doc/prefs.html b/doc/prefs.html
index 13614db281..5902eaacda 100644
--- a/doc/prefs.html
+++ b/doc/prefs.html
@@ -5,8 +5,8 @@
You can specify preferences determining and limiting
how BOINC uses your computers.
Preferences are divided into two groups:
-
Global preferences
-Global preferences apply to all projects in which you participate.
+
General preferences
+General preferences apply to all BOINC projects in which you participate.
They include:
Whether work (computation and network transfer) should be done
@@ -29,8 +29,8 @@ Changes are automatically propagated to all your hosts;
this is done the next time the host contacts the project's server,
so there may be some delay.
-
Per-project preferences
-There is a separate set of per-project preferences
+
Project preferences
+There is a separate set of project preferences
for each project in which you participate.
They include:
@@ -42,5 +42,20 @@ the amount allocated to a project is proportional to this number.
e.g., to specify graphics color schemes).
-You can view and edit per-project preferences through
+You can view and edit project preferences through
a web interface at the project's web site.
+
+
Location-specific preferences
+If you have computers both at home and at work
+you may want to use differences preferences for them.
+In addition to your "primary preferences"
+(which are used by default)
+BOINC allows you to create separate preferences for
+home, work, and school.
+
+Your account with a project has a "default location"
+(home, work, or school).
+New computers registered to your account will be
+given the default location.
+You can change the location of an existing computer
+through the project's web site.
diff --git a/html/user/add_venue_form.php b/html/user/add_venue_form.php
index 49d38374ab..d8c5f5c747 100644
--- a/html/user/add_venue_form.php
+++ b/html/user/add_venue_form.php
@@ -13,8 +13,8 @@
$subset = $_GET["subset"];
$x = subset_name($subset);
- page_head("Add $x preferences for computers at $venue");
- echo "
Add $x preferences for computers at $venue
";
+ page_head("Add $x preferences for $venue");
+ echo "