Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 20 additions & 14 deletions 34 services/console-proxy/rdpconsole/src/main/java/common/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ private void help() {
public void runClient(String[] args) {

try {

Protocol protocol = parseOptions(args);
if (protocol == Protocol.NONE)
return;
Expand Down Expand Up @@ -299,21 +298,28 @@ private Element setMainElementAndAddressBasedOnProtocol(Protocol protocol, SSLSt

private Protocol parseOptions(String[] args) {
String protocolName = (args.length > 0) ? args[0] : "";
Protocol protocol = Protocol.NONE;
Protocol protocol;
sureshanaparti marked this conversation as resolved.
Show resolved Hide resolved

Option[] options;
if (protocolName.equals("vnc")) {
protocol = Protocol.VNC;
options = join(commonOptions, vncOptions);
} else if (protocolName.equals("rdp")) {
protocol = Protocol.RDP;
options = join(commonOptions, rdpOptions);
} else if (protocolName.equals("hyperv")) {
protocol = Protocol.HYPERV;
options = join(commonOptions, hyperVOptions);
} else {
help();
return Protocol.NONE;
try {
protocol = Protocol.valueOf(protocolName);
} catch (IllegalArgumentException e) {
protocol = Protocol.NONE;
}

switch (protocol) {
case VNC:
options = join(commonOptions, vncOptions);
break;
case RDP:
options = join(commonOptions, rdpOptions);
break;
case HYPERV:
options = join(commonOptions, hyperVOptions);
break;
default:
help();
return Protocol.NONE;
}

// Parse all options for given protocol
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.