mirror of https://github.com/BOINC/boinc.git
Merge pull request #2745 from AenBleidd/fix_need_run_daemon
NeedRunDaemon option should be applied when connecting to localhost o…
This commit is contained in:
commit
03e37da9c0
|
@ -599,17 +599,16 @@ int CMainDocument::OnPoll() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wxGetApp().GetNeedRunDaemon()) {
|
if (wxGetApp().GetNeedRunDaemon() && IsComputerNameLocal(hostName)) {
|
||||||
if (IsComputerNameLocal(hostName)) {
|
if (m_pClientManager->StartupBOINCCore()) {
|
||||||
if (m_pClientManager->StartupBOINCCore()) {
|
Connect(wxT("localhost"), portNum, password, TRUE, TRUE);
|
||||||
Connect(wxT("localhost"), portNum, password, TRUE, TRUE);
|
|
||||||
} else {
|
|
||||||
m_pNetworkConnection->ForceDisconnect();
|
|
||||||
pFrame->ShowDaemonStartFailedAlert();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Connect(hostName, portNum, password, TRUE, password.IsEmpty());
|
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
m_pNetworkConnection->ForceDisconnect();
|
||||||
|
pFrame->ShowDaemonStartFailedAlert();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Connect(hostName, portNum, password, TRUE, password.IsEmpty());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -663,7 +662,7 @@ int CMainDocument::ResetState() {
|
||||||
|
|
||||||
|
|
||||||
int CMainDocument::Connect(const wxString& szComputer, int iPort, const wxString& szComputerPassword, const bool bDisconnect, const bool bUseDefaultPassword) {
|
int CMainDocument::Connect(const wxString& szComputer, int iPort, const wxString& szComputerPassword, const bool bDisconnect, const bool bUseDefaultPassword) {
|
||||||
if (IsComputerNameLocal(szComputer)) {
|
if (wxGetApp().GetNeedRunDaemon() && IsComputerNameLocal(szComputer)) {
|
||||||
// Restart client if not already running
|
// Restart client if not already running
|
||||||
m_pClientManager->AutoRestart();
|
m_pClientManager->AutoRestart();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue