diff --git a/checkin_notes b/checkin_notes index 1bd8f16b98..b7f9d530e1 100755 --- a/checkin_notes +++ b/checkin_notes @@ -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 diff --git a/client/log_flags.C b/client/log_flags.C index 7a2392e5a4..89cf1a0c59 100644 --- a/client/log_flags.C +++ b/client/log_flags.C @@ -43,13 +43,43 @@ 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,8 +181,13 @@ void LOG_FLAGS::show() { CONFIG::CONFIG() { memset(this, 0, sizeof(CONFIG)); + + defaults(); +} + +void CONFIG::defaults() { dont_check_file_sizes = false; - http_1_0 = false; + http_1_0 = false; save_stats_days = 30; max_file_xfers = MAX_FILE_XFERS; max_file_xfers_per_project = MAX_FILE_XFERS_PER_PROJECT; @@ -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); diff --git a/client/log_flags.h b/client/log_flags.h index 011708c0df..764d702bc2 100644 --- a/client/log_flags.h +++ b/client/log_flags.h @@ -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&); }; diff --git a/tools/make_project b/tools/make_project index ce1477385e..2ebd877456 100755 --- a/tools/make_project +++ b/tools/make_project @@ -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'