From b5df35740b050d93e559b8ad423f654c14f69591 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 2 Feb 2004 22:17:48 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=2936 --- client/scheduler_op.C | 6 +++--- lib/app_ipc.C | 9 +++++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/client/scheduler_op.C b/client/scheduler_op.C index 5037833a4f..0be17f9e1d 100644 --- a/client/scheduler_op.C +++ b/client/scheduler_op.C @@ -335,7 +335,7 @@ bool SCHEDULER_OP::poll() { vector urls; bool changed, scheduler_op_done; bool action = false, err = false; - char err_msg[256],*err_url=NULL; + char err_msg[256], *err_url=NULL; ScopeMessages scope_messages(log_messages, ClientMessages::DEBUG_SCHED_OP); @@ -576,11 +576,11 @@ int SCHEDULER_REPLY::parse(FILE* in, PROJECT* project) { // Do nothing } else if (match_tag(buf, "")) return 0; else if (parse_str(buf, "", project_name, sizeof(project_name))) continue; - else if (parse_str(buf, "", user_name, sizeof(user_name))) continue; + else if (parse_str(buf, "", user_name, sizeof(user_name))) continue; else if (parse_double(buf, "", user_total_credit)) continue; else if (parse_double(buf, "", user_expavg_credit)) continue; else if (parse_int(buf, "", (int &)user_create_time)) continue; - else if (parse_str(buf, "", team_name, sizeof(team_name))) continue; + else if (parse_str(buf, "", team_name, sizeof(team_name))) continue; else if (parse_int(buf, "", hostid)) continue; else if (parse_double(buf, "", host_total_credit)) continue; else if (parse_double(buf, "", host_expavg_credit)) continue; diff --git a/lib/app_ipc.C b/lib/app_ipc.C index 8fa4fe6eb0..259426d0f7 100755 --- a/lib/app_ipc.C +++ b/lib/app_ipc.C @@ -36,6 +36,7 @@ char* xml_graphics_modes[NGRAPHICS_MODES] = { #define REREAD_PREFS_MSG "" int write_init_data_file(FILE* f, APP_INIT_DATA& ai) { + string str1, str2; if (strlen(ai.app_name)) { fprintf(f, "%s\n", ai.app_name); } @@ -43,10 +44,14 @@ int write_init_data_file(FILE* f, APP_INIT_DATA& ai) { fprintf(f, "\n%s\n", ai.app_preferences); } if (strlen(ai.team_name)) { - fprintf(f, "%s\n", ai.team_name); + str1 = ai.team_name; + xml_escape(str1, str2); + fprintf(f, "%s\n", str2.c_str()); } if (strlen(ai.user_name)) { - fprintf(f, "%s\n", ai.user_name); + str1 = ai.user_name; + xml_escape(str1, str2); + fprintf(f, "%s\n", str2.c_str()); } if (strlen(ai.comm_obj_name)) { fprintf(f, "%s\n", ai.comm_obj_name);