From 390924f4d00e40d6266fb2065bc189567e00dfe0 Mon Sep 17 00:00:00 2001 From: Karl Chen Date: Sat, 26 Jul 2003 01:35:48 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=1828 --- checkin_notes | 3 +++ sched/handle_request.C | 12 +++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/checkin_notes b/checkin_notes index 69f77166b8..7d71ae0bbd 100755 --- a/checkin_notes +++ b/checkin_notes @@ -5395,6 +5395,9 @@ Karl 2003/07/25 added "run benchmarks now" File menu command, and display results. + Fixed global preferences not being updated to/from client because of + parse bug. + db/* sched/* py/* diff --git a/sched/handle_request.C b/sched/handle_request.C index e9c3f71d82..02113b9b20 100644 --- a/sched/handle_request.C +++ b/sched/handle_request.C @@ -430,16 +430,13 @@ int update_host_record(SCHEDULER_REQUEST& sreq, HOST& xhost) { // If DB has more recent global prefs than client's, send them. // int handle_global_prefs(SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply) { - unsigned int req_mod_time=0, db_mod_time=0; - bool need_update; - DB_USER user; - reply.send_global_prefs = false; if (strlen(sreq.global_prefs_xml)) { - need_update = false; - parse_int(sreq.global_prefs_xml, "", (int)req_mod_time); + bool need_update = false; + unsigned req_mod_time=0, db_mod_time=0; + parse_int(sreq.global_prefs_xml, "", (int&)req_mod_time); if (strlen(reply.user.global_prefs)) { - parse_int(reply.user.global_prefs, "", (int)db_mod_time); + parse_int(reply.user.global_prefs, "", (int&)db_mod_time); if (req_mod_time > db_mod_time) { need_update = true; } else if (req_mod_time < db_mod_time) { @@ -450,6 +447,7 @@ int handle_global_prefs(SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply) { } if (need_update) { safe_strcpy(reply.user.global_prefs, sreq.global_prefs_xml); + DB_USER user; user = reply.user; user.update(); }