diff --git a/checkin_notes b/checkin_notes index 10e5594e1f..98d64e402a 100755 --- a/checkin_notes +++ b/checkin_notes @@ -11872,3 +11872,13 @@ David 31 Oct 2006 cs_files.C win_build/ boincmgr_curl.vcproj + +David 31 Oct 2006 + - scheduler: parse mod_time correctly from global prefs + - user web: max CPUs defaults to 16 + + html/inc/ + prefs.inc + util.inc + sched/ + server_types.C diff --git a/html/inc/prefs.inc b/html/inc/prefs.inc index cbb93fafc0..c172c08eb4 100644 --- a/html/inc/prefs.inc +++ b/html/inc/prefs.inc @@ -384,7 +384,7 @@ function default_prefs_global() { $p->confirm_before_connecting = false; $p->hangup_if_dialed = true; $p->work_buf_min_days = .1; - $p->max_cpus = 0; + $p->max_cpus = 16; $p->cpu_usage_limit = 100; $p->disk_interval = 60; $dp = get_disk_space_config(); diff --git a/html/inc/util.inc b/html/inc/util.inc index 14dc31597a..64287e24b4 100644 --- a/html/inc/util.inc +++ b/html/inc/util.inc @@ -616,8 +616,10 @@ function verify_numeric(&$value, $low, $high = false) { $number = str_replace(',', '.', $number); // replace the german decimal separator // if no value was entered and this is ok if ($number=='' && $low=='') return true; + // the supplied value contains alphabetic characters if (!is_numeric($number)) return false; + if ($number < $low) $number = $low; if ($high) { if ($number > $high) $number = $high; diff --git a/sched/server_types.C b/sched/server_types.C index bd42ddd13a..c8c2940049 100644 --- a/sched/server_types.C +++ b/sched/server_types.C @@ -870,8 +870,9 @@ void GLOBAL_PREFS::parse(char* buf, char* venue) { char buf2[LARGE_BLOB_SIZE]; double dtemp; - memset(this, 0, sizeof(GLOBAL_PREFS)); + defaults(); + parse_int(buf, "", mod_time); // mod_time is outside of venue extract_venue(buf, venue, buf2); parse_double(buf2, "", disk_max_used_gb); parse_double(buf2, "", disk_max_used_pct); @@ -883,7 +884,6 @@ void GLOBAL_PREFS::parse(char* buf, char* venue) { if (parse_double(buf2, "", dtemp)) { ram_max_used_idle_frac = dtemp/100.; } - parse_int(buf2, "", mod_time); } void GLOBAL_PREFS::defaults() {