mirror of https://github.com/BOINC/boinc.git
remove version warning on startup
svn path=/trunk/boinc/; revision=1225
This commit is contained in:
parent
eee26a0db4
commit
8556c0b1a0
|
@ -499,12 +499,13 @@ int set_timer(double period) {
|
|||
}
|
||||
|
||||
void setup_shared_mem(void) {
|
||||
app_client_shm = new APP_CLIENT_SHM;
|
||||
#ifdef API_IGNORE_CLIENT
|
||||
app_client_shm->shm = NULL;
|
||||
fprintf( stderr, "Ignoring client, so not attaching to shared memory.\n" );
|
||||
return;
|
||||
#endif
|
||||
|
||||
app_client_shm = new APP_CLIENT_SHM;
|
||||
#ifdef _WIN32
|
||||
char buf[256];
|
||||
sprintf(buf, "%s%s", SHM_PREFIX, aid.comm_obj_name);
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#endif
|
||||
|
||||
#include "gutil.h"
|
||||
//GLfloat mat_diffuse[] = {0.7, 0.5, 1.0, 0.4};
|
||||
GLfloat mat_diffuse[] = {0.7, 0.5, 1.0, 0.4};
|
||||
GLfloat mat_specular[] = {1.0, 1.0, 1.0, 1.0};
|
||||
GLfloat mat_shininess[] = {40.0};
|
||||
|
||||
|
|
|
@ -626,7 +626,7 @@ bool CLIENT_STATE::do_something() {
|
|||
if (x) {action=true; print_log("update_results\n"); }
|
||||
|
||||
if (write_state_file_if_needed()) {
|
||||
fprintf(stderr, "Couldn't write state file");
|
||||
show_message(NULL, "Couldn't write state file", MSG_ERROR);
|
||||
}
|
||||
}
|
||||
print_log("End poll\n");
|
||||
|
@ -639,7 +639,7 @@ bool CLIENT_STATE::do_something() {
|
|||
// Parse the client_state.xml file
|
||||
//
|
||||
int CLIENT_STATE::parse_state_file() {
|
||||
char buf[256];
|
||||
char buf[256], ebuf[256];
|
||||
FILE* f = fopen(STATE_FILE_NAME, "r");
|
||||
PROJECT temp_project, *project;
|
||||
int retval=0;
|
||||
|
@ -649,6 +649,11 @@ int CLIENT_STATE::parse_state_file() {
|
|||
if (log_flags.state_debug) {
|
||||
printf("No state file; will create one\n");
|
||||
}
|
||||
|
||||
// avoid warning messages about version
|
||||
//
|
||||
old_major_version = MAJOR_VERSION;
|
||||
old_minor_version = MINOR_VERSION;
|
||||
return ERR_FOPEN;
|
||||
}
|
||||
fgets(buf, 256, f);
|
||||
|
@ -666,10 +671,11 @@ int CLIENT_STATE::parse_state_file() {
|
|||
if (project) {
|
||||
project->copy_state_fields(temp_project);
|
||||
} else {
|
||||
fprintf(stderr,
|
||||
sprintf(ebuf,
|
||||
"Project %s found in state file but not prefs.\n",
|
||||
temp_project.master_url
|
||||
);
|
||||
show_message(NULL, ebuf, MSG_ERROR);
|
||||
}
|
||||
} else if (match_tag(buf, "<app>")) {
|
||||
APP* app = new APP;
|
||||
|
@ -725,7 +731,9 @@ int CLIENT_STATE::parse_state_file() {
|
|||
retval = link_result(project, rp);
|
||||
if (!retval) results.push_back(rp);
|
||||
} else {
|
||||
fprintf(stderr, "error: link_result failed\n");
|
||||
show_message(NULL,
|
||||
"<result> found before any project\n", MSG_ERROR
|
||||
);
|
||||
delete rp;
|
||||
}
|
||||
} else if (match_tag(buf, "<host_info>")) {
|
||||
|
@ -757,7 +765,8 @@ int CLIENT_STATE::parse_state_file() {
|
|||
suspend_requested = true;
|
||||
} else if (parse_str(buf, "<host_venue>", host_venue, sizeof(host_venue))) {
|
||||
} else {
|
||||
fprintf(stderr, "CLIENT_STATE::parse_state_file: unrecognized: %s\n", buf);
|
||||
sprintf(buf, "CLIENT_STATE::parse_state_file: unrecognized: %s\n", buf);
|
||||
show_message(NULL, buf, MSG_ERROR);
|
||||
}
|
||||
}
|
||||
done:
|
||||
|
@ -770,6 +779,7 @@ done:
|
|||
//
|
||||
int CLIENT_STATE::write_state_file() {
|
||||
unsigned int i, j;
|
||||
char buf[256];
|
||||
FILE* f = fopen(STATE_FILE_TEMP, "w");
|
||||
int retval;
|
||||
|
||||
|
@ -777,7 +787,8 @@ int CLIENT_STATE::write_state_file() {
|
|||
printf("Writing state file\n");
|
||||
}
|
||||
if (!f) {
|
||||
fprintf(stderr, "can't open temp state file: %s\n", STATE_FILE_TEMP);
|
||||
sprintf(buf, "can't open temp state file: %s\n", STATE_FILE_TEMP);
|
||||
show_message(0, buf, MSG_ERROR);
|
||||
return ERR_FOPEN;
|
||||
}
|
||||
fprintf(f, "<client_state>\n");
|
||||
|
@ -954,13 +965,15 @@ int CLIENT_STATE::link_app_version(PROJECT* p, APP_VERSION* avp) {
|
|||
FILE_INFO* fip;
|
||||
FILE_REF file_ref;
|
||||
unsigned int i;
|
||||
char buf[256];
|
||||
|
||||
avp->project = p;
|
||||
app = lookup_app(p, avp->app_name);
|
||||
if (!app) {
|
||||
fprintf(stderr,
|
||||
sprintf(buf,
|
||||
"app_version refers to nonexistent app: %s\n", avp->app_name
|
||||
);
|
||||
show_message(0, buf, MSG_ERROR);
|
||||
return 1;
|
||||
}
|
||||
avp->app = app;
|
||||
|
@ -969,10 +982,11 @@ int CLIENT_STATE::link_app_version(PROJECT* p, APP_VERSION* avp) {
|
|||
file_ref = avp->app_files[i];
|
||||
fip = lookup_file_info(p, file_ref.file_name);
|
||||
if (!fip) {
|
||||
fprintf(stderr,
|
||||
sprintf(buf,
|
||||
"app_version refers to nonexistent file: %s\n",
|
||||
file_ref.file_name
|
||||
);
|
||||
show_message(0, buf, MSG_ERROR);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -988,12 +1002,14 @@ int CLIENT_STATE::link_app_version(PROJECT* p, APP_VERSION* avp) {
|
|||
|
||||
int CLIENT_STATE::link_file_ref(PROJECT* p, FILE_REF* file_refp) {
|
||||
FILE_INFO* fip;
|
||||
char buf[256];
|
||||
|
||||
fip = lookup_file_info(p, file_refp->file_name);
|
||||
if (!fip) {
|
||||
fprintf(stderr,
|
||||
"I/O desc links to nonexistent file: %s\n", file_refp->file_name
|
||||
sprintf(buf,
|
||||
"File ref refers to nonexistent file: %s\n", file_refp->file_name
|
||||
);
|
||||
show_message(0, buf, MSG_ERROR);
|
||||
return 1;
|
||||
}
|
||||
file_refp->file_info = fip;
|
||||
|
@ -1005,20 +1021,23 @@ int CLIENT_STATE::link_workunit(PROJECT* p, WORKUNIT* wup) {
|
|||
APP_VERSION* avp;
|
||||
unsigned int i;
|
||||
int retval;
|
||||
char buf[256];
|
||||
|
||||
app = lookup_app(p, wup->app_name);
|
||||
if (!app) {
|
||||
fprintf(stderr,
|
||||
sprintf(buf,
|
||||
"WU refers to nonexistent app: %s\n", wup->app_name
|
||||
);
|
||||
show_message(0, buf, MSG_ERROR);
|
||||
return 1;
|
||||
}
|
||||
avp = lookup_app_version(app, wup->version_num);
|
||||
if (!avp) {
|
||||
fprintf(stderr,
|
||||
sprintf(buf,
|
||||
"WU refers to nonexistent app_version: %s %d\n",
|
||||
wup->app_name, wup->version_num
|
||||
);
|
||||
show_message(0, buf, MSG_ERROR);
|
||||
return 1;
|
||||
}
|
||||
wup->project = p;
|
||||
|
@ -1035,6 +1054,7 @@ int CLIENT_STATE::link_result(PROJECT* p, RESULT* rp) {
|
|||
WORKUNIT* wup;
|
||||
unsigned int i;
|
||||
int retval;
|
||||
char buf[256];
|
||||
|
||||
wup = lookup_workunit(p, rp->wu_name);
|
||||
if (!wup) {
|
||||
|
@ -1047,7 +1067,8 @@ int CLIENT_STATE::link_result(PROJECT* p, RESULT* rp) {
|
|||
for (i=0; i<rp->output_files.size(); i++) {
|
||||
retval = link_file_ref(p, &rp->output_files[i]);
|
||||
if (retval) {
|
||||
fprintf(stderr, "error: link_result: link_file_ref failed\n");
|
||||
sprintf(buf, "link_result: link_file_ref failed\n");
|
||||
show_message(0, buf, MSG_ERROR);
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
|
@ -1058,6 +1079,7 @@ int CLIENT_STATE::latest_version_num(char* app_name) {
|
|||
unsigned int i;
|
||||
int best = -1;
|
||||
APP_VERSION* avp;
|
||||
char buf[256];
|
||||
|
||||
for (i=0; i<app_versions.size(); i++) {
|
||||
avp = app_versions[i];
|
||||
|
@ -1066,7 +1088,8 @@ int CLIENT_STATE::latest_version_num(char* app_name) {
|
|||
best = avp->version_num;
|
||||
}
|
||||
if (best < 0) {
|
||||
fprintf(stderr, "CLIENT_STATE::latest_version_num: no version\n");
|
||||
sprintf(buf, "CLIENT_STATE::latest_version_num: no version\n");
|
||||
show_message(0, buf, MSG_ERROR);
|
||||
}
|
||||
return best;
|
||||
}
|
||||
|
@ -1570,7 +1593,9 @@ int CLIENT_STATE::reset_project(PROJECT* project) {
|
|||
|
||||
for (i=0; i<results.size(); i++) {
|
||||
rp = results[i];
|
||||
rp->server_ack = true;
|
||||
if (rp->project == project) {
|
||||
rp->server_ack = true;
|
||||
}
|
||||
}
|
||||
|
||||
avp_iter = app_versions.begin();
|
||||
|
|
|
@ -324,6 +324,7 @@ int CLIENT_STATE::handle_scheduler_reply(
|
|||
int retval;
|
||||
unsigned int i;
|
||||
bool signature_valid;
|
||||
char buf[256];
|
||||
|
||||
nresults = 0;
|
||||
contacted_sched_server = true;
|
||||
|
@ -435,13 +436,9 @@ int CLIENT_STATE::handle_scheduler_reply(
|
|||
|
||||
// copy new entities to client state
|
||||
//
|
||||
|
||||
for (i=0; i<sr.apps.size(); i++) {
|
||||
APP* app = lookup_app(project, sr.apps[i].name);
|
||||
if (app) {
|
||||
//*app = sr.apps[i];
|
||||
retval = link_app(project,app); // not sure about this
|
||||
} else {
|
||||
if (!app) {
|
||||
app = new APP;
|
||||
*app = sr.apps[i];
|
||||
retval = link_app(project, app);
|
||||
|
@ -458,11 +455,19 @@ int CLIENT_STATE::handle_scheduler_reply(
|
|||
}
|
||||
for (i=0; i<sr.app_versions.size(); i++) {
|
||||
APP* app = lookup_app(project, sr.app_versions[i].app_name);
|
||||
if (!lookup_app_version(app, sr.app_versions[i].version_num)) {
|
||||
APP_VERSION* avp = new APP_VERSION;
|
||||
APP_VERSION* avp = lookup_app_version(app, sr.app_versions[i].version_num);
|
||||
if (!avp) {
|
||||
avp = new APP_VERSION;
|
||||
*avp = sr.app_versions[i];
|
||||
retval = link_app_version(project, avp);
|
||||
if (!retval) app_versions.push_back(avp);
|
||||
} else {
|
||||
// The list of file references may have changed.
|
||||
// Copy the list from the reply message,
|
||||
// and link to the FILE_INFOs
|
||||
//
|
||||
avp->app_files = sr.app_versions[i].app_files;
|
||||
link_app_version(project, avp);
|
||||
}
|
||||
}
|
||||
for (i=0; i<sr.workunits.size(); i++) {
|
||||
|
@ -485,7 +490,8 @@ int CLIENT_STATE::handle_scheduler_reply(
|
|||
rp->state = RESULT_NEW;
|
||||
nresults++;
|
||||
} else {
|
||||
fprintf(stderr, "ERROR: already have result %s\n", sr.results[i].name);
|
||||
sprintf(buf, "Already have result %s\n", sr.results[i].name);
|
||||
show_message(project, buf, MSG_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -499,10 +505,10 @@ int CLIENT_STATE::handle_scheduler_reply(
|
|||
if (rp) {
|
||||
rp->server_ack = true;
|
||||
} else {
|
||||
fprintf(stderr,
|
||||
"ERROR: got ack for result %s, can't find\n",
|
||||
sprintf(buf, "Got ack for result %s, can't find\n",
|
||||
sr.result_acks[i].name
|
||||
);
|
||||
show_message(project, buf, MSG_ERROR);
|
||||
}
|
||||
}
|
||||
project->sched_rpc_pending = false;
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
// If present, draw 2-D graph
|
||||
// <graph_alpha>
|
||||
// transparency of graph (0..1)
|
||||
// <app_file>
|
||||
// <open_name>background</open_name>
|
||||
// <url>...</url>
|
||||
// </app_file>
|
||||
|
||||
function project_specific_prefs_default() {
|
||||
return "<color_scheme>Tahiti Sunset</color_scheme>\n";
|
||||
|
@ -65,6 +69,11 @@ function project_specific_prefs_edit($prefs) {
|
|||
<td><input name=graph_alpha value='$prefs->graph_alpha'></td></tr>
|
||||
";
|
||||
}
|
||||
echo "<tr>
|
||||
<td align=right>URL of background (PPM format)</td>
|
||||
<td><input size=60 name=background value='$prefs->background'></td>
|
||||
</tr>
|
||||
";
|
||||
}
|
||||
|
||||
// Return XML version of project-specific prefs from form vars
|
||||
|
@ -77,40 +86,41 @@ function project_specific_prefs_parse_form() {
|
|||
$hold_time = $_GET["hold_time"];
|
||||
$graph_alpha = $_GET["graph_alpa"];
|
||||
$two_dim = $_GET["two_dim"];
|
||||
$background = $_GET["background"];
|
||||
|
||||
switch( $color_scheme ) {
|
||||
case "Tahiti Sunset":
|
||||
$start_hue = 0.5;
|
||||
$hue_change = 0.5;
|
||||
$grow_time = 10;
|
||||
$hold_time = 5;
|
||||
$graph_alpha = 0.7;
|
||||
$two_dim = "no";
|
||||
break;
|
||||
case "Desert Sands":
|
||||
$start_hue = 0.0;
|
||||
$hue_change = 0.2;
|
||||
$grow_time = 10;
|
||||
$hold_time = 5;
|
||||
$graph_alpha = 0.7;
|
||||
$two_dim = "no";
|
||||
break;
|
||||
case "Underwater":
|
||||
$start_hue = 0.2;
|
||||
$hue_change = 0.4;
|
||||
$grow_time = 10;
|
||||
$hold_time = 5;
|
||||
$graph_alpha = 0.7;
|
||||
$two_dim = "no";
|
||||
break;
|
||||
case "Custom":
|
||||
if ($start_hue == null) $start_hue = 0;
|
||||
if ($hue_change == null) $hue_change = 1;
|
||||
if ($grow_time == null) $grow_time = 10;
|
||||
if ($hold_time == null) $hold_time = 5;
|
||||
if ($graph_alpha == null) $graph_alpha = 0.7;
|
||||
if ($two_dim == null) $two_dim = "no";
|
||||
break;
|
||||
switch($color_scheme) {
|
||||
case "Tahiti Sunset":
|
||||
$start_hue = 0.5;
|
||||
$hue_change = 0.5;
|
||||
$grow_time = 10;
|
||||
$hold_time = 5;
|
||||
$graph_alpha = 0.7;
|
||||
$two_dim = "no";
|
||||
break;
|
||||
case "Desert Sands":
|
||||
$start_hue = 0.0;
|
||||
$hue_change = 0.2;
|
||||
$grow_time = 10;
|
||||
$hold_time = 5;
|
||||
$graph_alpha = 0.7;
|
||||
$two_dim = "no";
|
||||
break;
|
||||
case "Underwater":
|
||||
$start_hue = 0.2;
|
||||
$hue_change = 0.4;
|
||||
$grow_time = 10;
|
||||
$hold_time = 5;
|
||||
$graph_alpha = 0.7;
|
||||
$two_dim = "no";
|
||||
break;
|
||||
case "Custom":
|
||||
if ($start_hue == null) $start_hue = 0;
|
||||
if ($hue_change == null) $hue_change = 1;
|
||||
if ($grow_time == null) $grow_time = 10;
|
||||
if ($hold_time == null) $hold_time = 5;
|
||||
if ($graph_alpha == null) $graph_alpha = 0.7;
|
||||
if ($two_dim == null) $two_dim = "no";
|
||||
break;
|
||||
}
|
||||
$x = "<color_scheme>$color_scheme</color_scheme>
|
||||
<start_hue>$start_hue</start_hue>
|
||||
|
@ -120,6 +130,13 @@ function project_specific_prefs_parse_form() {
|
|||
<graph_alpha>$graph_alpha</graph_alpha>
|
||||
";
|
||||
if ($two_dim == "yes") $x = $x."<two_dim/>\n";
|
||||
if (strlen($background)) {
|
||||
$x = $x."<app_file>
|
||||
<url>$background</url>
|
||||
<open_name>background</open_name>
|
||||
</app_file>
|
||||
";
|
||||
}
|
||||
return $x;
|
||||
}
|
||||
|
||||
|
@ -136,6 +153,11 @@ function project_specific_prefs_show($prefs) {
|
|||
row2("Graph alpha", $prefs->graph_alpha);
|
||||
row2("Graph dimension", $dim);
|
||||
}
|
||||
if (strlen($prefs->background)) {
|
||||
row2("Background", $prefs->background);
|
||||
} else {
|
||||
row2("Background", "none");
|
||||
}
|
||||
}
|
||||
|
||||
// parse XML, fill in struct
|
||||
|
@ -148,5 +170,6 @@ function project_specific_prefs_parse($prefs_xml) {
|
|||
$prefs->hold_time = parse_element($prefs_xml, "<hold_time>");
|
||||
$prefs->graph_alpha = parse_element($prefs_xml, "<graph_alpha>");
|
||||
$prefs->two_dim = parse_element($prefs_xml, "<two_dim>");
|
||||
$prefs->background = parse_element($prefs_xml, "<url>");
|
||||
return $prefs;
|
||||
}
|
||||
|
|
|
@ -1,89 +0,0 @@
|
|||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "RSAEuro"=.\RSAEuro\RSAEuro.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "boinc_cli"=.\boinc_cli\boinc_cli.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "boinc_dll"=.\boinc_dll\boinc_dll.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "boinc_gui"=.\boinc_gui\boinc_gui.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "boinc_ss"=.\boinc_ss\boinc_ss.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "upper_case"=.\upper_case\upper_case.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
Loading…
Reference in New Issue