mirror of https://github.com/BOINC/boinc.git
be careful deleting project_init.xml
svn path=/trunk/boinc/; revision=8705
This commit is contained in:
parent
7959b99a3c
commit
c6c2422207
|
@ -13229,3 +13229,13 @@ David 20 Oct 2005
|
||||||
|
|
||||||
lib/
|
lib/
|
||||||
hostinfo.h
|
hostinfo.h
|
||||||
|
|
||||||
|
David 20 Oct 2005
|
||||||
|
- core client: delete project_init.xml only on detach via GUI RPC
|
||||||
|
(not on detach due to initial master file fetch failure)
|
||||||
|
|
||||||
|
client/
|
||||||
|
client_state.C
|
||||||
|
gui_rpc_server_ops.C
|
||||||
|
html/inc/
|
||||||
|
host.inc
|
||||||
|
|
|
@ -1324,7 +1324,7 @@ int CLIENT_STATE::detach_project(PROJECT* project) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//delete statistics file
|
// delete statistics file
|
||||||
//
|
//
|
||||||
get_statistics_filename(project->master_url, path);
|
get_statistics_filename(project->master_url, path);
|
||||||
retval = boinc_delete_file(path);
|
retval = boinc_delete_file(path);
|
||||||
|
@ -1344,19 +1344,6 @@ int CLIENT_STATE::detach_project(PROJECT* project) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if project_init.xml refers to this project,
|
|
||||||
// delete the file, otherwise we'll just
|
|
||||||
// reattach the next time the core client starts
|
|
||||||
//
|
|
||||||
if (!strcmp(project->master_url, project_init.url)) {
|
|
||||||
retval = project_init.remove();
|
|
||||||
if (retval) {
|
|
||||||
msg_printf(project, MSG_ERROR,
|
|
||||||
"Can't delete project init file: %s\n", boincerror(retval)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// remove project directory and its contents
|
// remove project directory and its contents
|
||||||
//
|
//
|
||||||
retval = remove_project_dir(*project);
|
retval = remove_project_dir(*project);
|
||||||
|
|
|
@ -160,6 +160,7 @@ static void handle_result_show_graphics(char* buf, MIOFILE& fout) {
|
||||||
|
|
||||||
|
|
||||||
static void handle_project_op(char* buf, MIOFILE& fout, const char* op) {
|
static void handle_project_op(char* buf, MIOFILE& fout, const char* op) {
|
||||||
|
int retval;
|
||||||
PROJECT* p = get_project(buf, fout);
|
PROJECT* p = get_project(buf, fout);
|
||||||
if (!p) {
|
if (!p) {
|
||||||
fout.printf("<error>no such project</error>\n");
|
fout.printf("<error>no such project</error>\n");
|
||||||
|
@ -177,6 +178,19 @@ static void handle_project_op(char* buf, MIOFILE& fout, const char* op) {
|
||||||
p->suspended_via_gui = false;
|
p->suspended_via_gui = false;
|
||||||
} else if (!strcmp(op, "detach")) {
|
} else if (!strcmp(op, "detach")) {
|
||||||
gstate.detach_project(p);
|
gstate.detach_project(p);
|
||||||
|
|
||||||
|
// if project_init.xml refers to this project,
|
||||||
|
// delete the file, otherwise we'll just
|
||||||
|
// reattach the next time the core client starts
|
||||||
|
//
|
||||||
|
if (!strcmp(p->master_url, gstate.project_init.url)) {
|
||||||
|
retval = gstate.project_init.remove();
|
||||||
|
if (retval) {
|
||||||
|
msg_printf(p, MSG_ERROR,
|
||||||
|
"Can't delete project init file: %s\n", boincerror(retval)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
} else if (!strcmp(op, "update")) {
|
} else if (!strcmp(op, "update")) {
|
||||||
p->sched_rpc_pending = true;
|
p->sched_rpc_pending = true;
|
||||||
p->min_rpc_time = 0;
|
p->min_rpc_time = 0;
|
||||||
|
|
|
@ -110,7 +110,9 @@ function show_host($host, $private, $ipprivate) {
|
||||||
row2("Number of times client has contacted server", $host->rpc_seqno);
|
row2("Number of times client has contacted server", $host->rpc_seqno);
|
||||||
row2("Last time contacted server", time_str($host->rpc_time));
|
row2("Last time contacted server", time_str($host->rpc_time));
|
||||||
row2("% of time BOINC client is running", 100*$host->on_frac." %");
|
row2("% of time BOINC client is running", 100*$host->on_frac." %");
|
||||||
row2("While BOINC running, % of time host has an Internet connection", 100*$host->connected_frac." %");
|
if ($host->connect_frac > 0) {
|
||||||
|
row2("While BOINC running, % of time host has an Internet connection", 100*$host->connected_frac." %");
|
||||||
|
}
|
||||||
row2("While BOINC running, % of time work is allowed", 100*$host->active_frac." %");
|
row2("While BOINC running, % of time work is allowed", 100*$host->active_frac." %");
|
||||||
if ($host->cpu_efficiency) {
|
if ($host->cpu_efficiency) {
|
||||||
row2("Average CPU efficiency", $host->cpu_efficiency);
|
row2("Average CPU efficiency", $host->cpu_efficiency);
|
||||||
|
|
Loading…
Reference in New Issue