From 70936974cfb136845b422ddc1aab2d60e242b989 Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Fri, 15 Oct 2010 02:07:39 +0000 Subject: [PATCH] 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 --- checkin_notes | 7 +++++++ clientgui/BOINCGUIApp.cpp | 13 +++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/checkin_notes b/checkin_notes index 73cccca796..33c797fdf6 100644 --- a/checkin_notes +++ b/checkin_notes @@ -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 diff --git a/clientgui/BOINCGUIApp.cpp b/clientgui/BOINCGUIApp.cpp index 0c9128ce8c..0e41f22557 100644 --- a/clientgui/BOINCGUIApp.cpp +++ b/clientgui/BOINCGUIApp.cpp @@ -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; }