aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2016-05-25 16:21:29 +0200
committerSiri Hansen <[email protected]>2016-05-26 15:08:27 +0200
commita990dd21e2388e109318a86b9df22298ea04a380 (patch)
tree9724cff8a9eab7842f5b84853dae226c80964a94
parentef7b3e6494c434a6f3a99a21076ba08d282d8be5 (diff)
downloadotp-a990dd21e2388e109318a86b9df22298ea04a380.tar.gz
otp-a990dd21e2388e109318a86b9df22298ea04a380.tar.bz2
otp-a990dd21e2388e109318a86b9df22298ea04a380.zip
Ignore data received in break mode in test telnet_server
The only command handled in break mode is 'q' = 'quit break mode'. Other data would earlier cause a function_clause exception. Other data could e.g. be a NOP poll (keep alive). To fix the problem, any data received in break mode, except 'q', will now be ignored.
-rw-r--r--lib/common_test/test/telnet_server.erl3
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 b8e54bdf5e..2c33cb268a 100644
--- a/lib/common_test/test/telnet_server.erl
+++ b/lib/common_test/test/telnet_server.erl
@@ -206,6 +206,9 @@ handle_break_cmd([$q|T],State) ->
%% Dummy cmd allowed in break mode - quit break mode
send("\r\n> ",State),
handle_data(T,State#state{break=false});
+handle_break_cmd([_H|T],State) ->
+ %% Unknown command i break mode - ignore
+ handle_break_cmd(T,State);
handle_break_cmd([],State) ->
{ok,State}.