mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=6578
This commit is contained in:
parent
d63e2eb038
commit
a4f7f6e51f
|
@ -9017,3 +9017,12 @@ Rom 7 July 2005
|
|||
gui_rpc_client.C
|
||||
msg_log.h
|
||||
stackwalker_win.cpp
|
||||
|
||||
Rom 7 July 2005
|
||||
- Bug Fix: Reduce the amount of time the call to
|
||||
wxDialUpManager->IsAlwaysOnline takes by preloading the DLL in memory.
|
||||
- Bug Fix: Only check for an always on connection every 60 seconds.
|
||||
|
||||
clientgui/
|
||||
MainFrame.cpp, .h
|
||||
stdwx.h
|
||||
|
|
|
@ -215,6 +215,9 @@ CMainFrame::CMainFrame(wxString strTitle) :
|
|||
|
||||
|
||||
#ifdef __WXMSW__
|
||||
// Prefetch and Load Wininet.dll so that any calls to
|
||||
// wxDialUpManager->IsAlwaysOnline happen quicker.
|
||||
m_WININET.Load(wxT("WININET"));
|
||||
m_pDialupManager = wxDialUpManager::Create();
|
||||
wxASSERT(m_pDialupManager->IsOk());
|
||||
#endif
|
||||
|
@ -1376,8 +1379,7 @@ void CMainFrame::OnFrameRender(wxTimerEvent &event) {
|
|||
}
|
||||
|
||||
#ifdef __WXMSW__
|
||||
// Determine if we need to connect to the Internet
|
||||
// Executes every ten seconds
|
||||
static wxDateTime dtLastDialupIsAlreadyOnlineCheck = wxDateTime((time_t)0);
|
||||
static wxDateTime dtLastDialupAlertSent = wxDateTime((time_t)0);
|
||||
static wxDateTime dtLastDialupRequest = wxDateTime((time_t)0);
|
||||
static wxDateTime dtFirstDialupDisconnectEvent = wxDateTime((time_t)0);
|
||||
|
@ -1385,6 +1387,7 @@ void CMainFrame::OnFrameRender(wxTimerEvent &event) {
|
|||
static bool connected_successfully = false;
|
||||
static bool reset_timers = false;
|
||||
static bool was_dialing = false;
|
||||
static bool is_already_online = true;
|
||||
bool should_check_connection = false;
|
||||
bool is_dialing = false;
|
||||
bool is_online = false;
|
||||
|
@ -1394,19 +1397,28 @@ void CMainFrame::OnFrameRender(wxTimerEvent &event) {
|
|||
wxString strConnectionUsername = wxEmptyString;
|
||||
wxString strConnectionPassword = wxEmptyString;
|
||||
wxString strBuffer = wxEmptyString;
|
||||
wxTimeSpan tsLastDialupIsAlreadyOnlineCheck;
|
||||
wxTimeSpan tsLastDialupAlertSent;
|
||||
wxTimeSpan tsLastDialupRequest;
|
||||
wxTimeSpan tsFirstDialupDisconnectEvent;
|
||||
|
||||
wxASSERT(m_pDialupManager->IsOk());
|
||||
if (m_pDialupManager && pDoc) {
|
||||
// Update the always online flag every 60 seconds. This call is expensive
|
||||
// on slow machines.
|
||||
tsLastDialupIsAlreadyOnlineCheck = wxDateTime::Now() - dtLastDialupIsAlreadyOnlineCheck;
|
||||
if (tsLastDialupIsAlreadyOnlineCheck.GetSeconds() > 60) {
|
||||
dtLastDialupIsAlreadyOnlineCheck = wxDateTime::Now();
|
||||
is_already_online = m_pDialupManager->IsAlwaysOnline();
|
||||
}
|
||||
|
||||
// Are we configured to detect a network or told one already exists?
|
||||
if (ID_NETWORKLAN != m_iNetworkConnectionType) {
|
||||
if (ID_NETWORKDIALUP == m_iNetworkConnectionType) {
|
||||
should_check_connection = true;
|
||||
}
|
||||
if (ID_NETWORKAUTODETECT == m_iNetworkConnectionType) {
|
||||
if (!m_pDialupManager->IsAlwaysOnline()) {
|
||||
if (!is_already_online) {
|
||||
should_check_connection = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -107,6 +107,7 @@ private:
|
|||
wxNotebook* m_pNotebook;
|
||||
CStatusBar* m_pStatusbar;
|
||||
#ifdef __WXMSW__
|
||||
wxDynamicLibrary m_WININET;
|
||||
wxDialUpManager* m_pDialupManager;
|
||||
#endif
|
||||
wxTimer* m_pRefreshStateTimer;
|
||||
|
|
|
@ -94,6 +94,7 @@
|
|||
#include <wx/icon.h>
|
||||
#include <wx/utils.h>
|
||||
#include <wx/process.h>
|
||||
#include <wx/dynlib.h>
|
||||
#include <wx/dialup.h>
|
||||
|
||||
#ifndef NOTASKBAR
|
||||
|
|
Loading…
Reference in New Issue