From e180d75f9865708f75fb349e5f2615fcb6975202 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Thu, 30 Jul 2009 00:14:30 +0000 Subject: [PATCH] - MGR: Re-enable the ability for the manager to detect a temporary name failure vs needing a proxy server or something like that. clientgui/ AccountManagerPropertiesPage.cpp, .h ProjectPropertiesPage.cpp, .h svn path=/branches/boinc_core_release_6_8/; revision=18775 --- checkin_notes | 8 ++++++++ clientgui/AccountManagerPropertiesPage.cpp | 21 ++------------------- clientgui/AccountManagerPropertiesPage.h | 4 ---- clientgui/ProjectPropertiesPage.cpp | 21 ++------------------- clientgui/ProjectPropertiesPage.h | 4 ---- 5 files changed, 12 insertions(+), 46 deletions(-) diff --git a/checkin_notes b/checkin_notes index 37bbcb765e..be3d856f3b 100644 --- a/checkin_notes +++ b/checkin_notes @@ -6132,6 +6132,14 @@ David 28 July 2009 client/ net_stats.cpp +Rom 29 July 2009 + - MGR: Re-enable the ability for the manager to detect a temporary + name failure vs needing a proxy server or something like that. + + clientgui/ + AccountManagerPropertiesPage.cpp, .h + ProjectPropertiesPage.cpp, .h + Rom 29 July 2009 - client: Initial swipe at automatic proxy server configuration detection on Windows. Fixes #35 diff --git a/clientgui/AccountManagerPropertiesPage.cpp b/clientgui/AccountManagerPropertiesPage.cpp index da5fac76ab..77e794338c 100644 --- a/clientgui/AccountManagerPropertiesPage.cpp +++ b/clientgui/AccountManagerPropertiesPage.cpp @@ -113,7 +113,6 @@ bool CAccountManagerPropertiesPage::Create( CBOINCBaseWizard* parent ) m_bProjectPropertiesSucceeded = false; m_bProjectPropertiesURLFailure = false; - m_bProjectPropertiesDNSFailure = false; m_bProjectPropertiesCommunicationFailure = false; m_bProjectAccountCreationDisabled = false; m_bProjectClientAccountCreationDisabled = false; @@ -211,7 +210,6 @@ void CAccountManagerPropertiesPage::OnPageChanged( wxWizardExEvent& event ) SetProjectPropertiesSucceeded(false); SetProjectPropertiesURLFailure(false); - SetProjectPropertiesDNSFailure(false); SetProjectPropertiesCommunicationFailure(false); SetProjectAccountCreationDisabled(false); SetProjectClientAccountCreationDisabled(false); @@ -344,23 +342,8 @@ void CAccountManagerPropertiesPage::OnStateChange( CAccountManagerPropertiesPage SetProjectPropertiesURLFailure(false); } - // DNS failures can be caused by a few different situations, but - // the most common is the machine is sitting behind a firewall - // and the local DNS servers do not know about the outside world. - // In this situation the user is expected to use a proxy server. - // - // Project domain moves or host name changes don't happen - // often enough for them to be the default assumtion. - // - bSuccessfulCondition = - (!iReturnValue) && (ERR_GETHOSTBYNAME == pc->error_num); - if (bSuccessfulCondition) { - SetProjectPropertiesDNSFailure(true); - } else { - SetProjectPropertiesDNSFailure(false); - } - bSuccessfulCondition = + (!iReturnValue) && (ERR_GETHOSTBYNAME == pc->error_num) || (!iReturnValue) && (ERR_CONNECT == pc->error_num) || (!iReturnValue) && (ERR_XML_PARSE == pc->error_num) || (!iReturnValue) && (ERR_PROJECT_DOWN == pc->error_num); @@ -490,7 +473,7 @@ wxWizardPageEx* CAccountManagerPropertiesPage::GetNext() const } else if (GetProjectPropertiesSucceeded()) { // We were successful in retrieving the project properties return PAGE_TRANSITION_NEXT(ID_ACCOUNTINFOPAGE); - } else if (GetProjectPropertiesDNSFailure() || GetNetworkConnectionNotDetected()) { + } else if (GetProjectPropertiesCommunicationFailure() && GetNetworkConnectionNotDetected()) { // No Internet Connection return PAGE_TRANSITION_NEXT(ID_ERRPROXYINFOPAGE); } else if (GetProjectPropertiesURLFailure()) { diff --git a/clientgui/AccountManagerPropertiesPage.h b/clientgui/AccountManagerPropertiesPage.h index 6e104be713..6acb753042 100644 --- a/clientgui/AccountManagerPropertiesPage.h +++ b/clientgui/AccountManagerPropertiesPage.h @@ -114,9 +114,6 @@ public: bool GetProjectPropertiesURLFailure() const { return m_bProjectPropertiesURLFailure ; } void SetProjectPropertiesURLFailure(bool value) { m_bProjectPropertiesURLFailure = value ; } - bool GetProjectPropertiesDNSFailure() const { return m_bProjectPropertiesDNSFailure ; } - void SetProjectPropertiesDNSFailure(bool value) { m_bProjectPropertiesDNSFailure = value ; } - bool GetProjectPropertiesCommunicationFailure() const { return m_bProjectPropertiesCommunicationFailure ; } void SetProjectPropertiesCommunicationFailure(bool value) { m_bProjectPropertiesCommunicationFailure = value ; } @@ -156,7 +153,6 @@ public: ////@end CAccountManagerPropertiesPage member variables bool m_bProjectPropertiesSucceeded; bool m_bProjectPropertiesURLFailure; - bool m_bProjectPropertiesDNSFailure; bool m_bProjectPropertiesCommunicationFailure; bool m_bProjectAccountCreationDisabled; bool m_bProjectClientAccountCreationDisabled; diff --git a/clientgui/ProjectPropertiesPage.cpp b/clientgui/ProjectPropertiesPage.cpp index c3eb612897..9e7366f990 100644 --- a/clientgui/ProjectPropertiesPage.cpp +++ b/clientgui/ProjectPropertiesPage.cpp @@ -110,7 +110,6 @@ bool CProjectPropertiesPage::Create( CBOINCBaseWizard* parent ) m_bProjectPropertiesSucceeded = false; m_bProjectPropertiesURLFailure = false; - m_bProjectPropertiesDNSFailure = false; m_bProjectPropertiesCommunicationFailure = false; m_bProjectAccountCreationDisabled = false; m_bProjectClientAccountCreationDisabled = false; @@ -195,7 +194,7 @@ wxWizardPageEx* CProjectPropertiesPage::GetNext() const } else if (GetProjectPropertiesSucceeded()) { // We were successful in retrieving the project properties return PAGE_TRANSITION_NEXT(ID_ACCOUNTINFOPAGE); - } else if (GetProjectPropertiesDNSFailure() || GetNetworkConnectionNotDetected()) { + } else if (GetProjectPropertiesCommunicationFailure() && GetNetworkConnectionNotDetected()) { // No Internet Connection return PAGE_TRANSITION_NEXT(ID_ERRPROXYINFOPAGE); } else if (GetProjectPropertiesURLFailure()) { @@ -339,7 +338,6 @@ void CProjectPropertiesPage::OnPageChanged( wxWizardExEvent& event ) { SetProjectPropertiesSucceeded(false); SetProjectPropertiesURLFailure(false); - SetProjectPropertiesDNSFailure(false); SetProjectPropertiesCommunicationFailure(false); SetProjectAccountCreationDisabled(false); SetProjectClientAccountCreationDisabled(false); @@ -466,23 +464,8 @@ void CProjectPropertiesPage::OnStateChange( CProjectPropertiesPageEvent& WXUNUSE SetProjectPropertiesURLFailure(false); } - // DNS failures can be caused by a few different situations, but - // the most common is the machine is sitting behind a firewall - // and the local DNS servers do not know about the outside world. - // In this situation the user is expected to use a proxy server. - // - // Project domain moves or host name changes don't happen - // often enough for them to be the default assumtion. - // - bSuccessfulCondition = - (!iReturnValue) && (ERR_GETHOSTBYNAME == pc->error_num); - if (bSuccessfulCondition) { - SetProjectPropertiesDNSFailure(true); - } else { - SetProjectPropertiesDNSFailure(false); - } - bSuccessfulCondition = + (!iReturnValue) && (ERR_GETHOSTBYNAME == pc->error_num) || (!iReturnValue) && (ERR_CONNECT == pc->error_num) || (!iReturnValue) && (ERR_XML_PARSE == pc->error_num) || (!iReturnValue) && (ERR_PROJECT_DOWN == pc->error_num); diff --git a/clientgui/ProjectPropertiesPage.h b/clientgui/ProjectPropertiesPage.h index c2779a4d88..30db9572bc 100644 --- a/clientgui/ProjectPropertiesPage.h +++ b/clientgui/ProjectPropertiesPage.h @@ -114,9 +114,6 @@ public: bool GetProjectPropertiesURLFailure() const { return m_bProjectPropertiesURLFailure ; } void SetProjectPropertiesURLFailure(bool value) { m_bProjectPropertiesURLFailure = value ; } - bool GetProjectPropertiesDNSFailure() const { return m_bProjectPropertiesDNSFailure ; } - void SetProjectPropertiesDNSFailure(bool value) { m_bProjectPropertiesDNSFailure = value ; } - bool GetProjectPropertiesCommunicationFailure() const { return m_bProjectPropertiesCommunicationFailure ; } void SetProjectPropertiesCommunicationFailure(bool value) { m_bProjectPropertiesCommunicationFailure = value ; } @@ -155,7 +152,6 @@ public: ////@end CProjectPropertiesPage member variables bool m_bProjectPropertiesSucceeded; bool m_bProjectPropertiesURLFailure; - bool m_bProjectPropertiesDNSFailure; bool m_bProjectPropertiesCommunicationFailure; bool m_bProjectAccountCreationDisabled; bool m_bProjectClientAccountCreationDisabled;