From 2cd158a358ceabe8cf65bef42732ac2e33f3c98a Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 10 Aug 2007 16:02:09 +0000 Subject: [PATCH 1/3] - client: timezone reflects daylight savings time (Win) from David Barnard; fixes #334 - GUI RPC: add replies for ops that don't return anything - GUI RPC: check args for project_attach - GUI RPC: return error (not blank) if no prefs override file - add error string for ERR_TOO_MANY_EXITS svn path=/trunk/boinc/; revision=13293 --- checkin_notes | 14 ++++++++++++++ checkin_notes_2005 | 2 +- client/gui_rpc_server_ops.C | 11 ++++++++++- client/hostinfo_win.C | 15 +++++++-------- doc/email_lists.php | 16 ++++++++-------- lib/str_util.C | 1 + 6 files changed, 41 insertions(+), 18 deletions(-) diff --git a/checkin_notes b/checkin_notes index 4b789d188a..f432da2c61 100755 --- a/checkin_notes +++ b/checkin_notes @@ -7724,3 +7724,17 @@ Rom 8 Aug 2007 clientgui/res/templates/ boincsnooze.ico boincdisconnect.ico + +David 10 Aug 2007 + - client: timezone reflects daylight savings time (Win) + from David Barnard; fixes #334 + - GUI RPC: add replies for ops that don't return anything + - GUI RPC: check args for project_attach + - GUI RPC: return error (not blank) if no prefs override file + - add error string for ERR_TOO_MANY_EXITS + + client/ + gui_rpc_server_ops.C + hostinfo_win.C + lib/ + str_util.C diff --git a/checkin_notes_2005 b/checkin_notes_2005 index 643185c55c..b95c5e0f10 100644 --- a/checkin_notes_2005 +++ b/checkin_notes_2005 @@ -1,4 +1,4 @@ -David 1 Jan 2005 +eavid 1 Jan 2005 - Deprecated the bad hash function used for the upload/download directory hierarchies. It wasn't uniform. diff --git a/client/gui_rpc_server_ops.C b/client/gui_rpc_server_ops.C index eebd2caf04..e5eb81c875 100644 --- a/client/gui_rpc_server_ops.C +++ b/client/gui_rpc_server_ops.C @@ -593,8 +593,9 @@ static void handle_get_cc_status(GUI_RPC_CONN* gr, MIOFILE& fout) { ); } -static void handle_network_available(char*, MIOFILE&) { +static void handle_network_available(char*, MIOFILE& fout) { net_status.network_available(); + fout.printf("\n"); } static void handle_get_project_init_status(char*, MIOFILE& fout) { @@ -637,6 +638,10 @@ static void handle_lookup_account(char* buf, MIOFILE& fout) { ACCOUNT_IN ai; ai.parse(buf); + if (!ai.url.size() || !ai.email_addr.size() || !ai.passwd_hash.size()) { + fout.printf("missing URL, email address, or password\n"); + return; + } gstate.lookup_account_op.do_rpc(ai); fout.printf("\n"); @@ -833,6 +838,8 @@ static void handle_get_global_prefs_override(MIOFILE& fout) { if (!retval) { strip_whitespace(s); fout.printf("%s\n", s.c_str()); + } else { + fout.printf("no prefs override file\n"); } } @@ -1107,6 +1114,7 @@ int GUI_RPC_CONN::handle_rpc() { } else if (match_tag(request_msg, "")) { + mf.printf("\n"); gstate.read_global_prefs(); gstate.request_schedule_cpus("Preferences override"); gstate.request_work_fetch("Preferences override"); @@ -1125,6 +1133,7 @@ int GUI_RPC_CONN::handle_rpc() { } else if (match_tag(request_msg, "")) { + mf.printf("\n"); read_config_file(); gstate.request_schedule_cpus("Core client configuration"); gstate.request_work_fetch("Core client configuration"); diff --git a/client/hostinfo_win.C b/client/hostinfo_win.C index d8123a48d1..06d1186007 100644 --- a/client/hostinfo_win.C +++ b/client/hostinfo_win.C @@ -87,15 +87,14 @@ struct INTERNALMONITORINFO // Returns the number of seconds difference from UTC // int get_timezone(int& timezone) { - TIME_ZONE_INFORMATION tzi; - - memset(&tzi, '\0', sizeof(TIME_ZONE_INFORMATION)); - - GetTimeZoneInformation(&tzi); - - timezone = -(tzi.Bias * 60); - + memset(&tzi, 0, sizeof(TIME_ZONE_INFORMATION)); + DWORD result = GetTimeZoneInformation(&tzi); + if (result == TIME_ZONE_ID_DAYLIGHT) { + timezone = -(tzi.DaylightBias * 60); + } else { + timezone = -(tzi.StandardBias * 60); + } return 0; } diff --git a/doc/email_lists.php b/doc/email_lists.php index 391f98c584..4e27d7a6bb 100644 --- a/doc/email_lists.php +++ b/doc/email_lists.php @@ -27,36 +27,36 @@ and help for BOINC is available here. "; list_start(); list_item( - "boinc_announce", + "boinc_announce", "Announcements of new versions of BOINC client software." ); list_item( - "boinc_projects", + "boinc_projects", "For people developing and operating BOINC projects. Questions and problems involving BOINC API and server software. Announcements of upgrades and changes. "); -list_item("boinc_dev", +list_item("boinc_dev", "For people developing, debugging or porting the BOINC software (client, server, and Web). Do NOT post questions about how to use the software. "); -list_item("boinc_loc", +list_item("boinc_loc", "For people doing non-English translations of the BOINC GUI or web interfaces. "); list_item( - "boinc_stats", + "boinc_stats", "For people developing web sites showing statistics for BOINC projects." ); -list_item("boinc_cvs", +list_item("boinc_cvs", "Summaries of BOINC CVS checkins are posted to this list. No other posts, please." ); -list_item("boinc_opt", +list_item("boinc_opt", "For people porting and optimizing BOINC applications." ); -list_item("boinc_helpers", +list_item("boinc_helpers", "For BOINC Help Volunteers, to discuss policies and user problems." ); diff --git a/lib/str_util.C b/lib/str_util.C index 2627be28b9..e59b59b672 100755 --- a/lib/str_util.C +++ b/lib/str_util.C @@ -676,6 +676,7 @@ const char* boincerror(int which_error) { case ERR_CHOWN: return "can't change owner"; case ERR_FILE_NOT_FOUND: return "file not found"; case ERR_BAD_FILENAME: return "file name is empty or has '..'"; + case ERR_TOO_MANY_EXITS: return "application exited too many times"; case 404: return "HTTP file not found"; case 407: return "HTTP proxy authentication failure"; case 416: return "HTTP range request error"; From 4a2e57e5522d2d90b2834d78e57e2949ce1dcce5 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 11 Aug 2007 03:30:03 +0000 Subject: [PATCH 2/3] - Manager: show the AMS name, not the skin name, in Wizard svn path=/trunk/boinc/; revision=13294 --- checkin_notes | 6 ++++++ clientgui/WelcomePage.cpp | 14 +++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/checkin_notes b/checkin_notes index f432da2c61..2ccf79056e 100755 --- a/checkin_notes +++ b/checkin_notes @@ -7738,3 +7738,9 @@ David 10 Aug 2007 hostinfo_win.C lib/ str_util.C + +David 10 Aug 2007 + - Manager: show the AMS name, not the skin name, in Wizard + + clientgui/ + WelcomePage.cpp diff --git a/clientgui/WelcomePage.cpp b/clientgui/WelcomePage.cpp index d43400fccc..9e945d7e60 100644 --- a/clientgui/WelcomePage.cpp +++ b/clientgui/WelcomePage.cpp @@ -325,17 +325,17 @@ void CWelcomePage::OnPageChanged( wxWizardExEvent& event ) { if (is_acct_mgr_detected) { m_pTitleStaticCtrl->SetLabel( - _("Attach to project (local override)") + _("Attach to project") ); strBuffer.Printf( - _("Please note that you should add projects at the\n" - "%s website.\n" + _("If possible, add projects at the\n" + "%s web site.\n" "\n" - "Any project added via this wizard will not be listed\n" - "or managed via %s."), - pSkinAdvanced->GetApplicationName().c_str(), - pSkinAdvanced->GetApplicationName().c_str() + "Projects added via this wizard will not be\n" + "listed on or managed via %s."), + wxString(ami.acct_mgr_name.c_str(), wxConvUTF8).c_str(), + wxString(ami.acct_mgr_name.c_str(), wxConvUTF8).c_str() ); m_pDescriptionStaticCtrl->SetLabel( From c14808514348d74e42f966e1091be849ad8d44ef Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 11 Aug 2007 03:34:38 +0000 Subject: [PATCH 3/3] - Manager: change "Retry communications" to "Do network communication" - client: use gethostname() to get host name on Linux svn path=/trunk/boinc/; revision=13295 --- checkin_notes | 11 +++++++++++ client/hostinfo_network.C | 7 ++++--- clientgui/AdvancedFrame.cpp | 4 ++-- lib/error_numbers.h | 2 +- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/checkin_notes b/checkin_notes index 2ccf79056e..ff63fac33e 100755 --- a/checkin_notes +++ b/checkin_notes @@ -7744,3 +7744,14 @@ David 10 Aug 2007 clientgui/ WelcomePage.cpp + +David 10 Aug 2007 + - Manager: change "Retry communications" to "Do network communication" + - client: use gethostname() to get host name on Linux + + client/ + hostinfo_network.C + clientgui/ + AdvancedFrame.cpp + lib/ + error_numbers.h diff --git a/client/hostinfo_network.C b/client/hostinfo_network.C index 335e5d40e9..bd0bf48830 100644 --- a/client/hostinfo_network.C +++ b/client/hostinfo_network.C @@ -62,13 +62,14 @@ int HOST_INFO::get_local_network_info() { struct in_addr addr; struct hostent* he; - if (gethostname(buf, 256)) return ERR_GETHOSTBYNAME; - he = gethostbyname(buf); + strcpy(domain_name, ""); + strcpy(ip_addr, ""); + if (gethostname(domain_name, 256)) return ERR_GETHOSTBYNAME; + he = gethostbyname(domain_name); if (!he || !he->h_addr_list[0]) { //msg_printf(NULL, MSG_ERROR, "gethostbyname (%s) failed", buf); return ERR_GETHOSTBYNAME; } - strlcpy(domain_name, he->h_name, sizeof(domain_name)); memcpy(&addr, he->h_addr_list[0], sizeof(addr)); strlcpy(ip_addr, inet_ntoa(addr), sizeof(ip_addr)); return 0; diff --git a/clientgui/AdvancedFrame.cpp b/clientgui/AdvancedFrame.cpp index 677d61ec50..fe333c85b7 100644 --- a/clientgui/AdvancedFrame.cpp +++ b/clientgui/AdvancedFrame.cpp @@ -487,8 +487,8 @@ bool CAdvancedFrame::CreateMenu() { ); menuAdvanced->Append( ID_COMMANDSRETRYCOMMUNICATIONS, - _("Retry &communications"), - _("Retry all deferred network communication.") + _("Do network &communication"), + _("Do all pending network communication.") ); menuAdvanced->Append( ID_READ_CONFIG, diff --git a/lib/error_numbers.h b/lib/error_numbers.h index ee35d40648..29b55f72c3 100755 --- a/lib/error_numbers.h +++ b/lib/error_numbers.h @@ -185,6 +185,6 @@ #define ERR_TOO_MANY_EXITS -226 // PLEASE: add a text description of your error to -// the text description function boincerror() in util.C. +// the text description function boincerror() in str_util.C. #endif