*** empty log message ***

svn path=/trunk/boinc/; revision=10145
This commit is contained in:
Rom Walton 2006-05-16 20:43:11 +00:00
parent ca9e044a3b
commit da6f65746f
11 changed files with 112 additions and 208 deletions

View File

@ -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

View File

@ -18,6 +18,8 @@
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "boinc_win.h"
#define COMPILE_MULTIMON_STUBS
#include <multimon.h>
#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();
}

View File

@ -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);

View File

@ -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;

View File

@ -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

View File

@ -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(

View File

@ -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;

View File

@ -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

View File

@ -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>", p_calculated)) continue;
else if (parse_str(buf, "<os_name>", os_name, sizeof(os_name))) continue;
else if (parse_str(buf, "<os_version>", os_version, sizeof(os_version))) continue;
else if (parse_double(buf, "<m_nbytes>", m_nbytes)) continue;
else if (parse_double(buf, "<m_cache>", m_cache)) continue;
else if (parse_double(buf, "<m_swap>", m_swap)) continue;
else if (parse_double(buf, "<d_total>", d_total)) continue;
else if (parse_double(buf, "<d_free>", d_free)) continue;
else if (parse_str(buf, "<os_name>", os_name, sizeof(os_name))) continue;
else if (parse_str(buf, "<os_version>", os_version, sizeof(os_version))) continue;
else if (parse_str(buf, "<accelerators>", accelerators, sizeof(accelerators))) continue;
}
return ERR_XML_PARSE;
}
@ -124,13 +127,14 @@ int HOST_INFO::write(MIOFILE& out) {
" <p_iops>%f</p_iops>\n"
" <p_membw>%f</p_membw>\n"
" <p_calculated>%f</p_calculated>\n"
" <os_name>%s</os_name>\n"
" <os_version>%s</os_version>\n"
" <m_nbytes>%f</m_nbytes>\n"
" <m_cache>%f</m_cache>\n"
" <m_swap>%f</m_swap>\n"
" <d_total>%f</d_total>\n"
" <d_free>%f</d_free>\n"
" <os_name>%s</os_name>\n"
" <os_version>%s</os_version>\n"
" <accelerators>%s</accelerators>\n"
"</host_info>\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;
}

View File

@ -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&);

View File

@ -592,29 +592,6 @@
<File
RelativePath="..\client\http_curl.C">
</File>
<File
RelativePath="..\lib\language.C">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BasicRuntimeChecks="3"
BrowseInformation="1"
CompileAs="2"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
CompileAs="2"/>
</FileConfiguration>
</File>
<File
RelativePath="..\Client\log_flags.C">
<FileConfiguration
@ -843,9 +820,6 @@
<File
RelativePath="..\client\http_curl.h">
</File>
<File
RelativePath="..\lib\language.h">
</File>
<File
RelativePath="..\client\log_flags.h">
</File>