David 26 Apr 2007

- core client: set config settings to default values before
        parsing cc_config.xml.
        Otherwise, if you have a lot of log flags set,
        and tell the client to reread a config file that
        doesn't specify ANY log flags,
        you'll end up with all the flags still set.
        (from Sebastian Masch)
    - make_project: add cmdline args for update_stats in initial config

    tools/
        make_project
    client/
        log_flags.C,h

svn path=/trunk/boinc/; revision=12490
This commit is contained in:
David Anderson 2007-04-26 21:57:42 +00:00
parent 04b3417483
commit 5184dedb1e
4 changed files with 58 additions and 3 deletions

View File

@ -4044,3 +4044,18 @@ David 26 Apr 2007
update_profile_pages.php
tools/
run_in_ops
David 26 Apr 2007
- core client: set config settings to default values before
parsing cc_config.xml.
Otherwise, if you have a lot of log flags set,
and tell the client to reread a config file that
doesn't specify ANY log flags,
you'll end up with all the flags still set.
(from Sebastian Masch)
- make_project: add cmdline args for update_stats in initial config
tools/
make_project
client/
log_flags.C,h

View File

@ -43,12 +43,42 @@ LOG_FLAGS::LOG_FLAGS() {
memset(this, 0, sizeof(LOG_FLAGS));
defaults();
}
void LOG_FLAGS::defaults() {
// on by default
// (others are off by default)
//
task = true;
file_xfer = true;
sched_ops = true;
// off by default; intended for developers and testers
//
cpu_sched = false;
cpu_sched_debug = false;
rr_simulation = false;
debt_debug = false;
task_debug = false;
work_fetch_debug = false;
unparsed_xml = false;
state_debug = false;
file_xfer_debug = false;
sched_op_debug = false;
http_debug = false;
proxy_debug = false;
time_debug = false;
http_xfer_debug = false;
benchmark_debug = false;
poll_debug = false;
guirpc_debug = false;
scrsave_debug = false;
app_msg_send = false;
app_msg_receive = false;
mem_usage_debug = false;
network_status_debug = false;
checkpoint_debug = false;
}
// Parse log flag preferences
@ -151,6 +181,11 @@ void LOG_FLAGS::show() {
CONFIG::CONFIG() {
memset(this, 0, sizeof(CONFIG));
defaults();
}
void CONFIG::defaults() {
dont_check_file_sizes = false;
http_1_0 = false;
save_stats_days = 30;
@ -227,6 +262,9 @@ int CONFIG::parse(FILE* f) {
int read_config_file() {
FILE* f;
log_flags.defaults();
config.defaults();
f = boinc_fopen(CONFIG_FILE, "r");
if (!f) return ERR_FOPEN;
config.parse(f);

View File

@ -75,6 +75,7 @@ struct LOG_FLAGS {
bool checkpoint_debug;
LOG_FLAGS();
void defaults();
int parse(XML_PARSER&);
void show();
};
@ -91,6 +92,7 @@ struct CONFIG {
bool os_random_only;
CONFIG();
void defaults();
int parse(FILE*);
int parse_options(XML_PARSER&);
};

View File

@ -241,7 +241,7 @@ t.cmd = 'run_in_ops update_forum_activities.php'
t = project.config.tasks.make_node_and_append("task")
t.period = '7 days'
t.output = 'update_stats.out'
t.cmd = 'update_stats'
t.cmd = 'update_stats -update_users -update_teams -update_hosts'
t = project.config.tasks.make_node_and_append("task")
t.period = '24 hours'