From 087aa849151cc079eaf605c38f4ec400644b0278 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 21 May 2007 14:49:00 +0000 Subject: [PATCH] - scheduler: fix bug that caused crash in anonymous platform case; don't send result platform or version num if anon platform. - back end: parse server status-related config elements (wwww_host etc.) to avoid XML warnings sched/ sched_config.C sched_send.C server_types.C svn path=/trunk/boinc/; revision=12701 --- checkin_notes | 11 +++++++++++ doc/index.php | 3 ++- sched/sched_config.C | 5 +++++ sched/sched_send.C | 8 +++++--- sched/server_types.C | 15 +++++++++++---- 5 files changed, 34 insertions(+), 8 deletions(-) diff --git a/checkin_notes b/checkin_notes index 39e21b7aa7..9cfbccc7a8 100755 --- a/checkin_notes +++ b/checkin_notes @@ -5093,3 +5093,14 @@ Rom 21 May 2007 SkinManager.cpp ViewWork.cpp ViewWorkGrid.cpp + +David 21 May 2007 + - scheduler: fix bug that caused crash in anonymous platform case; + don't send result platform or version num if anon platform. + - back end: parse server status-related config elements + (wwww_host etc.) to avoid XML warnings + + sched/ + sched_config.C + sched_send.C + server_types.C diff --git a/doc/index.php b/doc/index.php index 89882cb6b5..5e87e13111 100644 --- a/doc/index.php +++ b/doc/index.php @@ -116,7 +116,8 @@ function show_other() {
  • BOINC message boards
  • Papers and talks about BOINC
  • Logos and graphics -
  • Events +
  • Events (Note: the 3rd Pan-Galactic + BOINC Workshop will be held 5-6 September 2007 in Geneva, Switzerland.)
    diff --git a/sched/sched_config.C b/sched/sched_config.C index 23477c4688..3ca78d9e81 100644 --- a/sched/sched_config.C +++ b/sched/sched_config.C @@ -144,8 +144,13 @@ int SCHED_CONFIG::parse(FILE* f) { else if (xp.parse_str(tag, "min_passwd_length", temp, sizeof(temp))) continue; else if (xp.parse_str(tag, "disable_account_creation", temp, sizeof(temp))) continue; else if (xp.parse_str(tag, "no_forum_rating", temp, sizeof(temp))) continue; + else if (xp.parse_str(tag, "www_host", temp, sizeof(temp))) continue; + else if (xp.parse_str(tag, "uldl_host", temp, sizeof(temp))) continue; else if (xp.parse_str(tag, "uldl_pid", temp, sizeof(temp))) continue; + else if (xp.parse_str(tag, "sched_host", temp, sizeof(temp))) continue; else if (xp.parse_str(tag, "sched_pid", temp, sizeof(temp))) continue; + else if (xp.parse_str(tag, "ssh_exe", temp, sizeof(temp))) continue; + else if (xp.parse_str(tag, "ps_exe", temp, sizeof(temp))) continue; else if (xp.parse_str(tag, "min_core_client_version_announced", temp, sizeof(temp))) continue; else if (xp.parse_str(tag, "akismet_key", temp, sizeof(temp))) continue; else fprintf(stderr, "unknown tag: %s\n", tag); diff --git a/sched/sched_send.C b/sched/sched_send.C index 2ff95fb9a9..f44f37a55b 100644 --- a/sched/sched_send.C +++ b/sched/sched_send.C @@ -824,9 +824,11 @@ int add_result_to_reply( ); return retval; } - PLATFORM* pp = ssp->lookup_platform_id(avp->platformid); - strcpy(result.platform_name, pp->name); - result.version_num = avp->version_num; + if (avp) { + PLATFORM* pp = ssp->lookup_platform_id(avp->platformid); + strcpy(result.platform_name, pp->name); + result.version_num = avp->version_num; + } reply.insert_result(result); reply.wreq.seconds_to_fill -= wu_seconds_filled; request.estimated_delay += wu_seconds_filled/reply.host.p_ncpus; diff --git a/sched/server_types.C b/sched/server_types.C index 8e38c971d9..65a5e516ee 100644 --- a/sched/server_types.C +++ b/sched/server_types.C @@ -782,10 +782,17 @@ int RESULT::write_to_client(FILE* fout) { } *p = 0; fputs(buf, fout); - sprintf(buf2, " %s\n %d\n", - platform_name, version_num - ); - fputs(buf2, fout); + + // platform name will be null in anonymous case; don't send + // + if (strlen(platform_name)) { + sprintf(buf2, + " %s\n" + " %d\n", + platform_name, version_num + ); + fputs(buf2, fout); + } fputs("\n", fout); return 0; }