- client: use <foo>0|1</foo> instead of <foo/> or "" as XML boolean.

This distinguishes between "false" and "not defined"
    (did this in a few places, should do it everywhere)


svn path=/trunk/boinc/; revision=22750
This commit is contained in:
David Anderson 2010-11-27 04:02:15 +00:00
parent 4066ff8ab9
commit 086758bf54
3 changed files with 25 additions and 11 deletions

View File

@ -8437,3 +8437,12 @@ Charlie 26 Nov 2010
client/
client_types.cpp
David 26 Nov 2010
- client: use <foo>0|1</foo> instead of <foo/> or "" as XML boolean.
This distinguishes between "false" and "not defined"
(did this in a few places, should do it everywhere)
client/
acct_mgr.cpp
client_types.cpp

View File

@ -153,20 +153,22 @@ int ACCT_MGR_OP::do_rpc(
" <hostid>%d</hostid>\n"
" <not_started_dur>%f</not_started_dur>\n"
" <in_progress_dur>%f</in_progress_dur>\n"
"%s%s%s%s%s"
" <attached_via_acct_mgr>%d</attached_via_acct_mgr/>\n"
" <dont_request_more_work>%d</dont_request_more_work/>\n"
" <detach_when_done>%d</detach_when_done/>\n"
" <ended>%d</ended/>\n"
" </project>\n",
p->master_url,
p->project_name,
p->suspended_via_gui,
p->suspended_via_gui?1:0,
p->authenticator,
p->hostid,
not_started_dur,
in_progress_dur,
p->attached_via_acct_mgr?" <attached_via_acct_mgr/>\n":"",
p->suspended_via_gui?" <suspended_via_gui/>\n":"",
p->dont_request_more_work?" <dont_request_more_work/>\n":"",
p->detach_when_done?" <detach_when_done/>\n":"",
p->ended?" <ended/>\n":""
p->attached_via_acct_mgr?1:0,
p->dont_request_more_work?1:0,
p->detach_when_done?1:0,
p->ended?1:0
);
}
if (boinc_file_exists(GLOBAL_PREFS_FILE_NAME)) {

View File

@ -314,7 +314,10 @@ int PROJECT::write_state(MIOFILE& out, bool gui_rpc) {
" <sched_rpc_pending>%d</sched_rpc_pending>\n"
" <send_time_stats_log>%d</send_time_stats_log>\n"
" <send_job_log>%d</send_job_log>\n"
"%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
" <no_cpu_apps>%d</no_cpu_apps>\n"
" <no_cuda_apps>%d</no_cuda_apps>\n"
" <no_ati_apps>%d</no_ati_apps>\n"
"%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
master_url,
project_name,
symstore,
@ -362,6 +365,9 @@ int PROJECT::write_state(MIOFILE& out, bool gui_rpc) {
sched_rpc_pending,
send_time_stats_log,
send_job_log,
no_cpu_apps?1:0,
no_cuda_apps?1:0,
no_ati_apps?1:0,
anonymous_platform?" <anonymous_platform/>\n":"",
master_url_fetch_pending?" <master_url_fetch_pending/>\n":"",
trickle_up_pending?" <trickle_up_pending/>\n":"",
@ -374,9 +380,6 @@ int PROJECT::write_state(MIOFILE& out, bool gui_rpc) {
detach_when_done?" <detach_when_done/>\n":"",
ended?" <ended/>\n":"",
attached_via_acct_mgr?" <attached_via_acct_mgr/>\n":"",
no_cpu_apps?" <no_cpu_apps/>\n":"",
no_cuda_apps?" <no_cuda_apps/>\n":"",
no_ati_apps?" <no_ati_apps/>\n":"",
(this == gstate.scheduler_op->cur_proj)?" <scheduler_rpc_in_progress/>\n":"",
use_symlinks?" <use_symlinks/>\n":""
);