diff --git a/checkin_notes b/checkin_notes index 7a3badabea..26180d5546 100755 --- a/checkin_notes +++ b/checkin_notes @@ -4694,3 +4694,23 @@ Charlie 16 May 2006 Make_BOINC_Service.sh boinc.xcodeproj/ project.pbxproj + +Rom 15 May 2006 + - Bug Fix: Change the account not found window title to login failed. + - Bug Fix: If a login call fails for an account manager turn off using + cached credentials for the next login request. + - Add a field to the host info structure called accelerators. Right now + it just contains the name of the video card(s) in the computer on + Windows. In the future it could also contain information such as + if CrealSpeed, PCI-X math accelerator, is installed on the system. + - Remove what is now dead code in the manager. + + client/win/ + hostinfo_win.cpp + clientgui/ + AccountManagerProcessingPage.cpp + AccountManagerPropertiesPage.cpp, .h + NotFoundPage.cpp + ProjectPropertiesPage.cpp, .h + lib/ + hostinfo.C, .h diff --git a/client/win/hostinfo_win.cpp b/client/win/hostinfo_win.cpp index 28c9b91ae6..63717ad400 100755 --- a/client/win/hostinfo_win.cpp +++ b/client/win/hostinfo_win.cpp @@ -18,6 +18,8 @@ // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "boinc_win.h" +#define COMPILE_MULTIMON_STUBS +#include #include "client_types.h" #include "filesys.h" @@ -28,6 +30,7 @@ HINSTANCE g_hClientLibraryDll; + // Memory Status Structure for Win2K and WinXP based systems. typedef struct _MYMEMORYSTATUSEX { DWORD dwLength; @@ -44,6 +47,18 @@ typedef struct _MYMEMORYSTATUSEX { typedef BOOL (WINAPI *MYGLOBALMEMORYSTATUSEX)(LPMYMEMORYSTATUSEX lpBuffer); +// Traverse the video adapters and flag them as potiential accelerators. +struct INTERNALMONITORINFO +{ + DWORD cb; + TCHAR DeviceName[32]; + TCHAR DeviceString[128]; + DWORD StateFlags; + TCHAR DeviceID[128]; + TCHAR DeviceKey[128]; +}; + + // Returns the number of seconds difference from UTC // int get_timezone(void) { @@ -286,16 +301,8 @@ int HOST_INFO::get_host_info() { szSKU, szServicePack, szVersion ); - // Detect the number of CPUs - SYSTEM_INFO SystemInfo; - memset( &SystemInfo, NULL, sizeof( SystemInfo ) ); - ::GetSystemInfo( &SystemInfo ); + timezone = get_timezone(); - p_ncpus = SystemInfo.dwNumberOfProcessors; - - // Detect the filesystem information - get_filesystem_info(d_total, d_free); - // Open the WinSock dll so we can get host info WORD wVersionRequested; WSADATA wsdata; @@ -310,8 +317,9 @@ int HOST_INFO::get_host_info() { // Close the WinSock dll WSACleanup(); - timezone = get_timezone(); - + // Detect the filesystem information + get_filesystem_info(d_total, d_free); + // Detect the amount of memory the system has with the new API, if it doesn't // exist, then use the older API. HMODULE hKernel32; @@ -341,6 +349,13 @@ int HOST_INFO::get_host_info() { FreeLibrary(hKernel32); } + // Detect the number of CPUs + SYSTEM_INFO SystemInfo; + memset( &SystemInfo, NULL, sizeof( SystemInfo ) ); + ::GetSystemInfo( &SystemInfo ); + + p_ncpus = SystemInfo.dwNumberOfProcessors; + // gets processor vendor name and model name from registry, works for intel char vendorName[256], processorName[256], identifierName[256]; HKEY hKey; @@ -400,6 +415,34 @@ int HOST_INFO::get_host_info() { RegCloseKey(hKey); + + // Detect video accelerators on the system. + DWORD iDevice = 0; + INTERNALMONITORINFO dispdev; + dispdev.cb = sizeof(dispdev); + while(EnumDisplayDevices(NULL, iDevice, (PDISPLAY_DEVICE)&dispdev, 0)) { + // Ignore NetMeeting's mirrored displays + if ((dispdev.StateFlags & DISPLAY_DEVICE_MIRRORING_DRIVER) == 0) { + // Is the entry already listed? + if (!strstr(accelerators, dispdev.DeviceString)) { + // Is this the first entry? + if (!strlen(accelerators)) { + strncat(accelerators, dispdev.DeviceString, sizeof(accelerators)); + } else { + strncat(accelerators, "/", sizeof(accelerators)); + strncat(accelerators, dispdev.DeviceString, sizeof(accelerators)); + } + } + } + iDevice++; + } + + + // TODO: Detect the ClearSpeed accelerator card(s) + // TODO: Detect any other types of accelerators that might be useful + // for yhe scheduler to know about. + + if (!strlen(host_cpid)) { generate_host_cpid(); } diff --git a/clientgui/AccountManagerProcessingPage.cpp b/clientgui/AccountManagerProcessingPage.cpp index 3b3a9dff3d..13c7e580f5 100644 --- a/clientgui/AccountManagerProcessingPage.cpp +++ b/clientgui/AccountManagerProcessingPage.cpp @@ -289,6 +289,10 @@ void CAccountManagerProcessingPage::OnStateChange( CAccountManagerProcessingPage (ERR_BAD_EMAIL_ADDR == reply.error_num) || (ERR_BAD_PASSWD == reply.error_num) || CHECK_DEBUG_FLAG(WIZDEBUG_ERRACCOUNTNOTFOUND)) { + + // For any logon error, make sure we do not attempt to use cached credentials + // on any follow-ups. + pWAM->m_bCredentialsCached = false; SetProjectAccountNotFound(true); } else { SetProjectAccountNotFound(false); diff --git a/clientgui/AccountManagerPropertiesPage.cpp b/clientgui/AccountManagerPropertiesPage.cpp index fcc3061dcc..796fb11af9 100644 --- a/clientgui/AccountManagerPropertiesPage.cpp +++ b/clientgui/AccountManagerPropertiesPage.cpp @@ -316,78 +316,9 @@ void CAccountManagerPropertiesPage::OnStateChange( CAccountManagerPropertiesPage } else { SetProjectPropertiesURLFailure(false); } - SetNextState(ACCTMGRPROP_COMMUNICATEYAHOO_BEGIN); + SetNextState(ACCTMGRPROP_DETERMINENETWORKSTATUS_BEGIN); } break; -#if 0 - case ACCTMGRPROP_COMMUNICATEYAHOO_BEGIN: - SetNextState(ACCTMGRPROP_COMMUNICATEYAHOO_EXECUTE); - break; - case ACCTMGRPROP_COMMUNICATEYAHOO_EXECUTE: - // Attempt to successfully download the Yahoo homepage - pDoc->rpc.lookup_website(LOOKUP_YAHOO); - - // Wait until we are done processing the request. - dtStartExecutionTime = wxDateTime::Now(); - dtCurrentExecutionTime = wxDateTime::Now(); - tsExecutionTime = dtCurrentExecutionTime - dtStartExecutionTime; - iReturnValue = ERR_IN_PROGRESS; - while (ERR_IN_PROGRESS == iReturnValue && - tsExecutionTime.GetSeconds() <= 60 && - !CHECK_CLOSINGINPROGRESS() - ) - { - dtCurrentExecutionTime = wxDateTime::Now(); - tsExecutionTime = dtCurrentExecutionTime - dtStartExecutionTime; - iReturnValue = pDoc->rpc.lookup_website_poll(); - IncrementProgress(m_pProgressIndicator); - - ::wxMilliSleep(500); - ::wxSafeYield(GetParent()); - } - - if ((BOINC_SUCCESS == iReturnValue) && !CHECK_DEBUG_FLAG(WIZDEBUG_ERRYAHOOCOMM)) { - SetCommunicateYahooSucceeded(true); - } else { - SetCommunicateYahooSucceeded(false); - } - - SetNextState(ACCTMGRPROP_COMMUNICATEGOOGLE_BEGIN); - break; - case ACCTMGRPROP_COMMUNICATEGOOGLE_BEGIN: - SetNextState(ACCTMGRPROP_COMMUNICATEGOOGLE_EXECUTE); - break; - case ACCTMGRPROP_COMMUNICATEGOOGLE_EXECUTE: - // Attempt to successfully download the Google homepage - pDoc->rpc.lookup_website(LOOKUP_GOOGLE); - - // Wait until we are done processing the request. - dtStartExecutionTime = wxDateTime::Now(); - dtCurrentExecutionTime = wxDateTime::Now(); - tsExecutionTime = dtCurrentExecutionTime - dtStartExecutionTime; - iReturnValue = ERR_IN_PROGRESS; - while (ERR_IN_PROGRESS == iReturnValue && - tsExecutionTime.GetSeconds() <= 60 && - !CHECK_CLOSINGINPROGRESS() - ) - { - dtCurrentExecutionTime = wxDateTime::Now(); - tsExecutionTime = dtCurrentExecutionTime - dtStartExecutionTime; - iReturnValue = pDoc->rpc.lookup_website_poll(); - IncrementProgress(m_pProgressIndicator); - - ::wxMilliSleep(500); - ::wxSafeYield(GetParent()); - } - - if ((BOINC_SUCCESS == iReturnValue) && !CHECK_DEBUG_FLAG(WIZDEBUG_ERRGOOGLECOMM)) { - SetCommunicateGoogleSucceeded(true); - } else { - SetCommunicateGoogleSucceeded(false); - } -#endif - SetNextState(ACCTMGRPROP_DETERMINENETWORKSTATUS_BEGIN); - break; case ACCTMGRPROP_DETERMINENETWORKSTATUS_BEGIN: SetNextState(ACCTMGRPROP_DETERMINENETWORKSTATUS_EXECUTE); break; diff --git a/clientgui/AccountManagerPropertiesPage.h b/clientgui/AccountManagerPropertiesPage.h index ad57571c5b..e5e642b3ca 100644 --- a/clientgui/AccountManagerPropertiesPage.h +++ b/clientgui/AccountManagerPropertiesPage.h @@ -55,14 +55,10 @@ END_DECLARE_EVENT_TYPES() #define ACCTMGRPROP_INIT 0 #define ACCTMGRPROP_RETRPROJECTPROPERTIES_BEGIN 1 #define ACCTMGRPROP_RETRPROJECTPROPERTIES_EXECUTE 2 -#define ACCTMGRPROP_COMMUNICATEYAHOO_BEGIN 3 -#define ACCTMGRPROP_COMMUNICATEYAHOO_EXECUTE 4 -#define ACCTMGRPROP_COMMUNICATEGOOGLE_BEGIN 5 -#define ACCTMGRPROP_COMMUNICATEGOOGLE_EXECUTE 6 -#define ACCTMGRPROP_DETERMINENETWORKSTATUS_BEGIN 7 -#define ACCTMGRPROP_DETERMINENETWORKSTATUS_EXECUTE 8 -#define ACCTMGRPROP_CLEANUP 9 -#define ACCTMGRPROP_END 10 +#define ACCTMGRPROP_DETERMINENETWORKSTATUS_BEGIN 3 +#define ACCTMGRPROP_DETERMINENETWORKSTATUS_EXECUTE 4 +#define ACCTMGRPROP_CLEANUP 5 +#define ACCTMGRPROP_END 6 /*! * CAccountManagerPropertiesPage class declaration diff --git a/clientgui/NotFoundPage.cpp b/clientgui/NotFoundPage.cpp index af9d5a9312..128a4b6893 100644 --- a/clientgui/NotFoundPage.cpp +++ b/clientgui/NotFoundPage.cpp @@ -173,7 +173,7 @@ void CErrNotFoundPage::OnPageChanged( wxWizardExEvent& event ) { wxASSERT(m_pDirectionsStaticCtrl); m_pTitleStaticCtrl->SetLabel( - _("Account not found") + _("Login Failed.") ); if (((CBOINCBaseWizard*)GetParent())->project_config.uses_username) { m_pDirectionsStaticCtrl->SetLabel( diff --git a/clientgui/ProjectPropertiesPage.cpp b/clientgui/ProjectPropertiesPage.cpp index b0fd1fa086..b32acb6588 100644 --- a/clientgui/ProjectPropertiesPage.cpp +++ b/clientgui/ProjectPropertiesPage.cpp @@ -454,79 +454,9 @@ void CProjectPropertiesPage::OnStateChange( CProjectPropertiesPageEvent& event ) } else { SetProjectPropertiesURLFailure(false); } - SetNextState(PROJPROP_COMMUNICATEYAHOO_BEGIN); + SetNextState(PROJPROP_DETERMINENETWORKSTATUS_BEGIN); } break; -#if 0 - case PROJPROP_COMMUNICATEYAHOO_BEGIN: - SetNextState(PROJPROP_COMMUNICATEYAHOO_EXECUTE); - break; - case PROJPROP_COMMUNICATEYAHOO_EXECUTE: - // Attempt to successfully download the Yahoo homepage - pDoc->rpc.lookup_website(LOOKUP_YAHOO); - - // Wait until we are done processing the request. - dtStartExecutionTime = wxDateTime::Now(); - dtCurrentExecutionTime = wxDateTime::Now(); - tsExecutionTime = dtCurrentExecutionTime - dtStartExecutionTime; - iReturnValue = ERR_IN_PROGRESS; - while (ERR_IN_PROGRESS == iReturnValue && - tsExecutionTime.GetSeconds() <= 60 && - !CHECK_CLOSINGINPROGRESS() - ) - { - dtCurrentExecutionTime = wxDateTime::Now(); - tsExecutionTime = dtCurrentExecutionTime - dtStartExecutionTime; - iReturnValue = pDoc->rpc.lookup_website_poll(); - IncrementProgress(m_pProgressIndicator); - - ::wxMilliSleep(500); - ::wxSafeYield(GetParent()); - } - - if ((BOINC_SUCCESS == iReturnValue) && !CHECK_DEBUG_FLAG(WIZDEBUG_ERRYAHOOCOMM)) { - SetCommunicateYahooSucceeded(true); - } else { - SetCommunicateYahooSucceeded(false); - } - - SetNextState(PROJPROP_COMMUNICATEGOOGLE_BEGIN); - break; - case PROJPROP_COMMUNICATEGOOGLE_BEGIN: - SetNextState(PROJPROP_COMMUNICATEGOOGLE_EXECUTE); - break; - case PROJPROP_COMMUNICATEGOOGLE_EXECUTE: - // Attempt to successfully download the Google homepage - pDoc->rpc.lookup_website(LOOKUP_GOOGLE); - - // Wait until we are done processing the request. - dtStartExecutionTime = wxDateTime::Now(); - dtCurrentExecutionTime = wxDateTime::Now(); - tsExecutionTime = dtCurrentExecutionTime - dtStartExecutionTime; - iReturnValue = ERR_IN_PROGRESS; - while (ERR_IN_PROGRESS == iReturnValue && - tsExecutionTime.GetSeconds() <= 60 && - !CHECK_CLOSINGINPROGRESS() - ) - { - dtCurrentExecutionTime = wxDateTime::Now(); - tsExecutionTime = dtCurrentExecutionTime - dtStartExecutionTime; - iReturnValue = pDoc->rpc.lookup_website_poll(); - IncrementProgress(m_pProgressIndicator); - - ::wxMilliSleep(500); - ::wxSafeYield(GetParent()); - } - - if ((BOINC_SUCCESS == iReturnValue) && !CHECK_DEBUG_FLAG(WIZDEBUG_ERRGOOGLECOMM)) { - SetCommunicateGoogleSucceeded(true); - } else { - SetCommunicateGoogleSucceeded(false); - } - - SetNextState(PROJPROP_DETERMINENETWORKSTATUS_BEGIN); - break; -#endif case PROJPROP_DETERMINENETWORKSTATUS_BEGIN: SetNextState(PROJPROP_DETERMINENETWORKSTATUS_EXECUTE); break; diff --git a/clientgui/ProjectPropertiesPage.h b/clientgui/ProjectPropertiesPage.h index 18dcd66195..ddaff7d1f2 100644 --- a/clientgui/ProjectPropertiesPage.h +++ b/clientgui/ProjectPropertiesPage.h @@ -55,14 +55,10 @@ END_DECLARE_EVENT_TYPES() #define PROJPROP_INIT 0 #define PROJPROP_RETRPROJECTPROPERTIES_BEGIN 1 #define PROJPROP_RETRPROJECTPROPERTIES_EXECUTE 2 -#define PROJPROP_COMMUNICATEYAHOO_BEGIN 3 -#define PROJPROP_COMMUNICATEYAHOO_EXECUTE 4 -#define PROJPROP_COMMUNICATEGOOGLE_BEGIN 5 -#define PROJPROP_COMMUNICATEGOOGLE_EXECUTE 6 -#define PROJPROP_DETERMINENETWORKSTATUS_BEGIN 7 -#define PROJPROP_DETERMINENETWORKSTATUS_EXECUTE 8 -#define PROJPROP_CLEANUP 9 -#define PROJPROP_END 10 +#define PROJPROP_DETERMINENETWORKSTATUS_BEGIN 3 +#define PROJPROP_DETERMINENETWORKSTATUS_EXECUTE 4 +#define PROJPROP_CLEANUP 5 +#define PROJPROP_END 6 /*! * CProjectPropertiesPage class declaration diff --git a/lib/hostinfo.C b/lib/hostinfo.C index a2a179fcbf..a853f513bb 100644 --- a/lib/hostinfo.C +++ b/lib/hostinfo.C @@ -57,15 +57,17 @@ void HOST_INFO::clear_host_info() { p_membw = 0; p_calculated = 0; - strcpy(os_name, ""); - strcpy(os_version, ""); - m_nbytes = 0; m_cache = 0; m_swap = 0; d_total = 0; d_free = 0; + + strcpy(os_name, ""); + strcpy(os_version, ""); + + strcpy(accelerators, ""); } int HOST_INFO::parse(MIOFILE& in) { @@ -96,13 +98,14 @@ int HOST_INFO::parse(MIOFILE& in) { continue; } else if (parse_double(buf, "", p_calculated)) continue; - else if (parse_str(buf, "", os_name, sizeof(os_name))) continue; - else if (parse_str(buf, "", os_version, sizeof(os_version))) continue; else if (parse_double(buf, "", m_nbytes)) continue; else if (parse_double(buf, "", m_cache)) continue; else if (parse_double(buf, "", m_swap)) continue; else if (parse_double(buf, "", d_total)) continue; else if (parse_double(buf, "", d_free)) continue; + else if (parse_str(buf, "", os_name, sizeof(os_name))) continue; + else if (parse_str(buf, "", os_version, sizeof(os_version))) continue; + else if (parse_str(buf, "", accelerators, sizeof(accelerators))) continue; } return ERR_XML_PARSE; } @@ -124,13 +127,14 @@ int HOST_INFO::write(MIOFILE& out) { " %f\n" " %f\n" " %f\n" - " %s\n" - " %s\n" " %f\n" " %f\n" " %f\n" " %f\n" " %f\n" + " %s\n" + " %s\n" + " %s\n" "\n", timezone, domain_name, @@ -143,13 +147,14 @@ int HOST_INFO::write(MIOFILE& out) { p_iops, p_membw, p_calculated, - os_name, - os_version, m_nbytes, m_cache, m_swap, d_total, - d_free + d_free, + os_name, + os_version, + accelerators ); return 0; } diff --git a/lib/hostinfo.h b/lib/hostinfo.h index d23f9a6091..f1262987dd 100644 --- a/lib/hostinfo.h +++ b/lib/hostinfo.h @@ -48,9 +48,6 @@ public: double p_membw; double p_calculated; // when benchmarks were last run, or zero - char os_name[256]; - char os_version[256]; - double m_nbytes; // Total amount of memory in bytes double m_cache; double m_swap; // Total amount of swap space in bytes @@ -58,6 +55,14 @@ public: double d_total; // Total amount of diskspace in bytes double d_free; // Total amount of available diskspace in bytes + char os_name[256]; + char os_version[256]; + + char accelerators[256]; + // Next generation video cards are going to include physics engines + // and other types of co-processors. Collect the data for now. + + HOST_INFO(); int parse(MIOFILE&); int write(MIOFILE&); diff --git a/win_build/boinc_cli_curl.vcproj b/win_build/boinc_cli_curl.vcproj index 2e5e25b804..14ea9c62b6 100644 --- a/win_build/boinc_cli_curl.vcproj +++ b/win_build/boinc_cli_curl.vcproj @@ -592,29 +592,6 @@ - - - - - - - - - -