Showing the changes to assignment-client/src/AssignmentClientApp.cpp (1 of 8 files). Show all
Unified · Split
| @@ -4,6 +4,7 @@ · 3 unmodified lines | ||
| 4 | 4 | // |
| 5 | 5 | // Created by Seth Alves on 2/19/15. |
| 6 | 6 | // Copyright 2015 High Fidelity, Inc. |
| 7 | +// Copyright 2021 Vircadia contributors. | |
| 7 | 8 | // |
| 8 | 9 | // Distributed under the Apache License, Version 2.0. |
| 9 | 10 | // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html |
| @@ -44,7 +45,7 @@ AssignmentClientApp::AssignmentClientApp(int argc, char* argv[]) : · 34 unmodified lines | ||
| 44 | 45 | |
| 45 | 46 | // parse command-line |
| 46 | 47 | QCommandLineParser parser; |
| 47 | − parser.setApplicationDescription("High Fidelity Assignment Client"); | |
| 48 | + parser.setApplicationDescription("Vircadia Assignment Client"); | |
| 48 | 49 | const QCommandLineOption helpOption = parser.addHelpOption(); |
| 49 | 50 | const QCommandLineOption versionOption = parser.addVersionOption(); |
| 50 | 51 | |
| @@ -54,8 +55,8 @@ AssignmentClientApp::AssignmentClientApp(int argc, char* argv[]) : · 3 unmodified lines | ||
| 54 | 55 | type = static_cast<Assignment::Type>(static_cast<int>(type) + 1)) { |
| 55 | 56 | typeDescription.append(QStringLiteral("\n%1 | %2").arg(QString::number(type), Assignment::typeToString(type))); |
| 56 | 57 | } |
| 57 | − const QCommandLineOption clientTypeOption(ASSIGNMENT_TYPE_OVERRIDE_OPTION, typeDescription, "type"); | |
| 58 | 58 | |
| 59 | + const QCommandLineOption clientTypeOption(ASSIGNMENT_TYPE_OVERRIDE_OPTION, typeDescription, "type"); | |
| 59 | 60 | parser.addOption(clientTypeOption); |
| 60 | 61 | |
| 61 | 62 | const QCommandLineOption poolOption(ASSIGNMENT_POOL_OPTION, "set assignment pool", "pool-name"); |
| @@ -99,6 +100,9 @@ AssignmentClientApp::AssignmentClientApp(int argc, char* argv[]) : · 37 unmodified lines | ||
| 99 | 100 | const QCommandLineOption logDirectoryOption(ASSIGNMENT_LOG_DIRECTORY, "directory to store logs", "log-directory"); |
| 100 | 101 | parser.addOption(logDirectoryOption); |
| 101 | 102 | |
| 103 | + const QCommandLineOption disableDomainPortAutoDiscoveryOption(ASSIGNMENT_DISABLE_DOMAIN_AUTO_PORT_DISCOVERY, "disable automatic discovery of the domain server port"); | |
| 104 | + parser.addOption(disableDomainPortAutoDiscoveryOption); | |
| 105 | + | |
| 102 | 106 | const QCommandLineOption parentPIDOption(PARENT_PID_OPTION, "PID of the parent process", "parent-pid"); |
| 103 | 107 | parser.addOption(parentPIDOption); |
| 104 | 108 | |
| @@ -151,11 +155,14 @@ AssignmentClientApp::AssignmentClientApp(int argc, char* argv[]) : · 46 unmodified lines | ||
| 151 | 155 | } |
| 152 | 156 | |
| 153 | 157 | QString logDirectory; |
| 154 | − | |
| 155 | 158 | if (parser.isSet(logDirectoryOption)) { |
| 156 | 159 | logDirectory = parser.value(logDirectoryOption); |
| 157 | 160 | } |
| 158 | 161 | |
| 162 | + bool disableDomainPortAutoDiscovery = false; | |
| 163 | + if (parser.isSet(disableDomainPortAutoDiscoveryOption)) { | |
| 164 | + disableDomainPortAutoDiscovery = true; | |
| 165 | + } | |
| 159 | 166 | |
| 160 | 167 | Assignment::Type requestAssignmentType = Assignment::AllTypes; |
| 161 | 168 | if (argumentVariantMap.contains(ASSIGNMENT_TYPE_OVERRIDE_OPTION)) { |
| @@ -250,13 +257,15 @@ AssignmentClientApp::AssignmentClientApp(int argc, char* argv[]) : · 88 unmodified lines | ||
| 250 | 257 | AssignmentClientMonitor* monitor = new AssignmentClientMonitor(numForks, minForks, maxForks, |
| 251 | 258 | requestAssignmentType, assignmentPool, listenPort, |
| 252 | 259 | childMinListenPort, walletUUID, assignmentServerHostname, |
| 253 | − assignmentServerPort, httpStatusPort, logDirectory); | |
| 260 | + assignmentServerPort, httpStatusPort, logDirectory, | |
| 261 | + disableDomainPortAutoDiscovery); | |
| 254 | 262 | monitor->setParent(this); |
| 255 | 263 | connect(this, &QCoreApplication::aboutToQuit, monitor, &AssignmentClientMonitor::aboutToQuit); |
| 256 | 264 | } else { |
| 257 | 265 | AssignmentClient* client = new AssignmentClient(requestAssignmentType, assignmentPool, listenPort, |
| 258 | 266 | walletUUID, assignmentServerHostname, |
| 259 | − assignmentServerPort, monitorPort); | |
| 267 | + assignmentServerPort, monitorPort, | |
| 268 | + disableDomainPortAutoDiscovery); | |
| 260 | 269 | client->setParent(this); |
| 261 | 270 | connect(this, &QCoreApplication::aboutToQuit, client, &AssignmentClient::aboutToQuit); |
| 262 | 271 | } |