- client (Win): if running as service, and service is suspended/resumed,

restore previous run state rather than going to auto.
- client: improve startup messages (non-system user??)

svn path=/trunk/boinc/; revision=15442
This commit is contained in:
David Anderson 2008-06-20 16:21:55 +00:00
parent 279d613910
commit bf55f0838d
7 changed files with 25 additions and 27 deletions

View File

@ -5014,3 +5014,12 @@ David 19 June 2008
lib/
diagnostics.C
David 20 June 2008
- client (Win): if running as service, and service is suspended/resumed,
restore previous run state rather than going to auto.
- client: improve startup messages (non-system user??)
client/
client_state.C
main.C

View File

@ -195,34 +195,18 @@ int CLIENT_STATE::init() {
msg_printf(NULL, MSG_INFO, "Libraries: %s", curl_version());
if (executing_as_daemon) {
msg_printf(NULL, MSG_INFO, "Executing as a daemon");
msg_printf(NULL, MSG_INFO, "Running as a daemon");
}
relative_to_absolute("", buf);
msg_printf(NULL, MSG_INFO, "Data directory: %s", buf);
// if we are running as anybody other than localsystem
// and executing as a daemon then app graphics won't work.
// display a note at startup reminding user of that.
//
#ifdef _WIN32
DWORD buf_size = sizeof(buf);
LPTSTR pbuf = buf;
GetUserName(pbuf, &buf_size);
if (executing_as_daemon && (strcmp("SYSTEM", pbuf))) {
msg_printf(NULL, MSG_INFO,
"BOINC is running as a service and as a non-system user."
);
}
#endif
#ifdef __APPLE__
if (executing_as_daemon) {
msg_printf(NULL, MSG_INFO,
"BOINC is running as a daemon."
);
}
msg_printf(NULL, MSG_INFO, "Running under account %s", pbuf);
#endif
parse_account_files();

View File

@ -490,8 +490,8 @@ int boinc_main_loop() {
requested_suspend = false;
}
if (requested_resume) {
gstate.run_mode.set(RUN_MODE_AUTO, 0);
gstate.network_mode.set(RUN_MODE_AUTO, 0);
gstate.run_mode.set(RUN_MODE_RESTORE, 0);
gstate.network_mode.set(RUN_MODE_RESTORE, 0);
requested_resume = false;
}
#endif

View File

@ -13,7 +13,7 @@ $biomed = array(
),
array(
"Superlink@Technion",
"http://cbl-link02.cs.technion.ac.il/superlinkattechnion/",
"http://cbl-boinc-server2.cs.technion.ac.il/superlinkattechnion/",
"Technion, Israel",
"Genetic linkage analysis",
"Superlink@Technion helps geneticists all over the world find disease-provoking genes causing some types of diabetes, hypertension (high blood pressure), cancer, schizophrenia and many others.",

View File

@ -30,6 +30,7 @@ class BoltSelect extends BoltSet {
$state_rec = $iter->state[$this->name];
$child_name = $state_rec['child_name'];
echo "FINISHED: $child_name";
$now = time();
BoltSelectFinished::insert("(user_id, course_id, end_time, name, selected_unit, view_id) values ($user->id, $course->id, $now, '$this->name', '$child_name', $view->id)");
parent::finished($iter);

View File

@ -1,5 +1,7 @@
<?php
require_once("../inc/bolt_db.inc");
// a "snapshot" is a condensed representation of the results
// for a particular select/xset pair.
// Namely, it's an array whose elements contain
@ -32,9 +34,13 @@ function write_snapshot($course_id, $select_name, $xset_name, $start) {
foreach ($sfs as $sf) {
$uid = $sf->user_id;
if (!array_key_exists($uid, $a)) continue;
if ($sf->end_time > $a[$uid]->xr->create_time) continue;
if (!is_set($a[$uid]->sf || $sf->create_time > $a[$uid]->sf.create_time) {
$a[$uid]->sf = $sf;
$x = $a[$uid];
$xr = $x->xr;
if ($sf->end_time > $xr->create_time) continue;
$s = $x->sf;
if (!is_set($x->sf) || $sf->create_time > $s.create_time) {
$x->sf = $sf;
$a[$uid] = $x;
}
}
$filename = "compare_snapshot_$course_id_$select_name_$xset_name.json";
@ -54,7 +60,6 @@ function read_snapshot($course_id, $select_name, $xset_name) {
// show comparison results for a given select/xset pair.
//
function show_comparison($ss, $filter, $breakdown) {
//
}
function show_form() {
@ -63,7 +68,6 @@ function show_form() {
}
function show_results() {
}
// get names of units of a given type

View File

@ -99,7 +99,7 @@ function xset_with_review() {
function sample_xset() {
return exercise_set(
name('exercise set 1'),
name('sample exercise set'),
number(1),
exercise(
name('exercise 1'),