- MGR: Get rid of an exit(0) call since it is evil in Windows

programs.

    clientgui/
        MainDocument.cpp

svn path=/trunk/boinc/; revision=12793
This commit is contained in:
Rom Walton 2007-05-31 18:16:40 +00:00
parent 237df33b9a
commit f5f354910c
2 changed files with 16 additions and 6 deletions

View File

@ -5650,3 +5650,10 @@ David 31 May 2007
sched_array.C
sched_locality.C
server_types.C
Rom 31 May 2007
- MGR: Get rid of an exit(0) call since it is evil in Windows
programs.
clientgui/
MainDocument.cpp

View File

@ -483,7 +483,11 @@ int CMainDocument::FrameShutdownDetected() {
int CMainDocument::GetCoreClientStatus(CC_STATUS& ccs, bool bForce) {
wxString strMachine = wxEmptyString;
int iRetVal = 0;
CBOINCBaseFrame* pFrame = wxGetApp().GetFrame();
wxASSERT(wxDynamicCast(pFrame, CBOINCBaseFrame));
if (IsConnected()) {
wxTimeSpan ts(wxDateTime::Now() - m_dtCachedCCStatusTimestamp);
@ -493,12 +497,11 @@ int CMainDocument::GetCoreClientStatus(CC_STATUS& ccs, bool bForce) {
iRetVal = rpc.get_cc_status(ccs);
if (0 == iRetVal) {
status = ccs;
if (ccs.manager_must_quit) {
// TODO:
// if client is remote, don't do anything
// otherwise notify user and exit
exit(0);
GetConnectedComputerName(strMachine);
if (IsComputerNameLocal(strMachine)) {
pFrame->Close(true);
}
}
}
} else {