diff options
author | Siri Hansen <[email protected]> | 2016-05-20 11:37:13 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2016-05-20 11:37:13 +0200 |
commit | 8651f714e7b06f85f765ab01697984a1687d56bb (patch) | |
tree | 99df331f857a93e4aa64365f7ffab2cae7c9252a /lib/common_test | |
parent | fe324afcc0d2e114c680b5cd28c170e98f839720 (diff) | |
download | otp-8651f714e7b06f85f765ab01697984a1687d56bb.tar.gz otp-8651f714e7b06f85f765ab01697984a1687d56bb.tar.bz2 otp-8651f714e7b06f85f765ab01697984a1687d56bb.zip |
Don't throw rest of line when NOP is received in test telnet_server
If telnet command NOP (No Operation) was received in the same tcp
package as other data, then the rest of the data would be regarded
further telnet commands (to proceed IAC, Interprete As Command) and
would never get to telnet_server:do_handle_data/2.
This is now corrected.
Diffstat (limited to 'lib/common_test')
-rw-r--r-- | lib/common_test/test/telnet_server.erl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/common_test/test/telnet_server.erl b/lib/common_test/test/telnet_server.erl index d3cffd88ff..b8e54bdf5e 100644 --- a/lib/common_test/test/telnet_server.erl +++ b/lib/common_test/test/telnet_server.erl @@ -193,6 +193,9 @@ handle_cmd([?AYT|T],State) -> %% Used when testing 'newline' option in ct_telnet:send and ct_telnet:cmd. send("yes\r\n> ",State), handle_data(T,State); +handle_cmd([?NOP|T],State) -> + %% Used for 'keep alive' + handle_data(T,State); handle_cmd([_H|T],State) -> %% Not responding to this command handle_cmd(T,State); |