From 7b926b10f5b3fd79f6bb21da40efd2db7888796f Mon Sep 17 00:00:00 2001 From: Eric Heien Date: Tue, 11 Feb 2003 19:41:08 +0000 Subject: [PATCH] bug fixes svn path=/trunk/boinc/; revision=892 --- client/client_types.C | 2 +- client/cs_scheduler.C | 2 +- client/scheduler_op.C | 21 ++++++++------------- 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/client/client_types.C b/client/client_types.C index f8727ed580..fad2fd02dd 100644 --- a/client/client_types.C +++ b/client/client_types.C @@ -182,7 +182,7 @@ int PROJECT::write_state(FILE* out) { nrpc_failures, min_rpc_time ); - if (code_sign_key) { + if (strlen(code_sign_key)) { fprintf(out, " \n%s\n", code_sign_key ); diff --git a/client/cs_scheduler.C b/client/cs_scheduler.C index 39091b94a4..b24103da0c 100644 --- a/client/cs_scheduler.C +++ b/client/cs_scheduler.C @@ -187,7 +187,7 @@ int CLIENT_STATE::make_scheduler_request(PROJECT* p, double work_req) { core_client_minor_version, work_req ); - if (p->code_sign_key) { + if (strlen(p->code_sign_key)) { fprintf(f, "\n%s\n", p->code_sign_key); } diff --git a/client/scheduler_op.C b/client/scheduler_op.C index 1c2e55286a..e13c7e820a 100644 --- a/client/scheduler_op.C +++ b/client/scheduler_op.C @@ -533,39 +533,34 @@ int SCHEDULER_REPLY::parse(FILE* in) { } else if (parse_int(buf, "", request_delay)) { continue; } else if (match_tag(buf, "")) { - retval = copy_element_contents( + retval = dup_element_contents( in, "", - global_prefs_xml, - sizeof(global_prefs_xml) + &global_prefs_xml ); if (retval) return ERR_XML_PARSE; } else if (match_tag(buf, "")) { - retval = copy_element_contents( + retval = dup_element_contents( in, "", - project_prefs_xml, - sizeof(project_prefs_xml) + &project_prefs_xml ); if (retval) return ERR_XML_PARSE; } else if (match_tag(buf, "")) { - retval = copy_element_contents( + retval = dup_element_contents( in, "", - code_sign_key, - sizeof(code_sign_key) + &code_sign_key ); - //fprintf(stderr, "code_sign_key: %s\n", code_sign_key); if (retval) { fprintf(stderr, "error: SCHEDULER_REPLY.parse: xml parsing error\n"); return ERR_XML_PARSE; } } else if (match_tag(buf, "")) { - retval = copy_element_contents( + retval = dup_element_contents( in, "", - code_sign_key_signature, - sizeof(code_sign_key_signature) + &code_sign_key_signature ); if (retval) return ERR_XML_PARSE; } else if (match_tag(buf, "")) {