mirror of https://github.com/BOINC/boinc.git
MGR: Add dummy version check.
It seems that this check will work if the client will check newer file version on start. Client will check this even the last check was more that 14 days ago and on start only. Client newer saves this information in its internal files and never reread 'get_current_version.xml' between checks. In any other cases result will be empty.
This commit is contained in:
parent
d6ff95d1ec
commit
d5ef54221e
|
@ -164,6 +164,7 @@ void CNetworkConnection::Poll() {
|
|||
if (!retval) {
|
||||
wxLogTrace(wxT("Function Status"), wxT("CNetworkConnection::Poll - Connection Success"));
|
||||
SetStateSuccess(m_strNewComputerName, m_strNewComputerPassword);
|
||||
m_pDocument->CheckForVersionUpdate();
|
||||
} else if (ERR_AUTHENTICATOR == retval) {
|
||||
wxLogTrace(wxT("Function Status"), wxT("CNetworkConnection::Poll - RPC Authorization - ERR_AUTHENTICATOR"));
|
||||
SetStateErrorAuthentication();
|
||||
|
@ -1278,6 +1279,21 @@ bool CMainDocument::IsUserAuthorized() {
|
|||
return true;
|
||||
}
|
||||
|
||||
void CMainDocument::CheckForVersionUpdate() {
|
||||
std::string version, url;
|
||||
// It seems that this check will work if the client will check newer file version on start.
|
||||
// Client will check this even the last check was more that 14 days ago and on start only.
|
||||
// Client newer saves this information in its internal files
|
||||
// and never reread 'get_current_version.xml' between checks.
|
||||
// In any other cases result will be empty.
|
||||
rpc.get_newer_version(version, url);
|
||||
|
||||
if (!version.empty() && !url.empty()) {
|
||||
char message[MAXPATHLEN];
|
||||
snprintf(message, sizeof(message), "%s: %s", wxT("You can download it here"), url);
|
||||
wxGetApp().SafeMessageBox(message, wxT("A new version of BOINC is available."));
|
||||
}
|
||||
}
|
||||
|
||||
int CMainDocument::CachedProjectStatusUpdate(bool bForce) {
|
||||
int i = 0;
|
||||
|
|
|
@ -167,6 +167,8 @@ public:
|
|||
|
||||
bool IsUserAuthorized();
|
||||
|
||||
void CheckForVersionUpdate();
|
||||
|
||||
CNetworkConnection* m_pNetworkConnection;
|
||||
CBOINCClientManager* m_pClientManager;
|
||||
AsyncRPC rpc;
|
||||
|
|
Loading…
Reference in New Issue