Skip to content
Open
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
5 changes: 3 additions & 2 deletions src/main/java/com/bytezone/dm3270/telnet/TelnetCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ public TelnetCommand(TelnetState state, byte[] buffer, int length) {
} else if (type == TelnetSubcommand.START_TLS) {
commandType = CommandType.START_TLS;
} else {
throw new InvalidParameterException(
String.format("Unknown telnet command type: %02X %02X%n", command, type));
commandType = null;
}
} else {
throw new InvalidParameterException("Buffer incorrect length");
Expand Down Expand Up @@ -111,6 +110,8 @@ public void process(Screen screen) {
boolean preference = telnetState.doBinary(); // preference
reply[1] = preference ? WILL : WONT;
telnetState.setDoesBinary(preference); // set actual
} else if (commandType == null) {
reply[1] = WONT;
}

setReply(new TelnetCommand(telnetState, reply));
Expand Down