MGR: Don't require --multiple arg to launch a new instance if both --namehost and --password args are specified

svn path=/trunk/boinc/; revision=22520
This commit is contained in:
Charlie Fenton 2010-10-15 02:07:39 +00:00
parent 75a9b079d2
commit 70936974cf
2 changed files with 18 additions and 2 deletions

View File

@ -7341,3 +7341,10 @@ Rom 14 Oct 2010
clientgui/
BOINCGUIApp.cpp, .h
MainDocument.cpp
Charlie 14 Oct 2010
- MGR: Don't require --multiple arg to launch a new instance if both
--namehost and --password args are specified.
clientgui/
BOINCGUIApp.cpp

View File

@ -551,6 +551,8 @@ bool CBOINCGUIApp::OnCmdLineParsed(wxCmdLineParser &parser) {
wxApp::OnCmdLineParsed(parser);
wxString portNum = wxEmptyString;
long longPort;
bool hostNameSpecified = false;
bool passwordSpecified = false;
parser.Found(wxT("boincargs"), &m_strBOINCArguments);
if (parser.Found(wxT("autostart"))) {
@ -587,7 +589,9 @@ bool CBOINCGUIApp::OnCmdLineParsed(wxCmdLineParser &parser) {
}
#endif
if (!parser.Found(wxT("namehost"), &m_strHostNameArg)) {
if (parser.Found(wxT("namehost"), &m_strHostNameArg)) {
hostNameSpecified = true;
} else {
m_strHostNameArg = wxT("localhost");
}
@ -601,10 +605,15 @@ bool CBOINCGUIApp::OnCmdLineParsed(wxCmdLineParser &parser) {
m_iRPCPortArg = GUI_RPC_PORT;
}
if (!parser.Found(wxT("password"), &m_strPasswordArg)) {
if (parser.Found(wxT("password"), &m_strPasswordArg)) {
passwordSpecified = true;
} else {
m_strPasswordArg = wxEmptyString;
}
if (hostNameSpecified && passwordSpecified) {
m_bMultipleInstancesOK = true;
}
return true;
}