From 8651f714e7b06f85f765ab01697984a1687d56bb Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Fri, 20 May 2016 11:37:13 +0200 Subject: 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. --- lib/common_test/test/telnet_server.erl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib') 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); -- cgit v1.2.3