From 9dfedc025906ad3f56ae130fec3e9de7ee380a1e Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Mon, 20 Aug 2012 10:03:21 +0200 Subject: [common_test] Handle all ssh_cm messages in ct_netconfc:handle_msg/2 Only {data,...} and {closed,...} was handled, which caused the test to fail with with a function_clause crash in ct_netconfc when {exit_status,...} was received. This has been corrected. --- lib/common_test/src/ct_netconfc.erl | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'lib/common_test/src') diff --git a/lib/common_test/src/ct_netconfc.erl b/lib/common_test/src/ct_netconfc.erl index d9c4a962dc..5f8bae89fa 100644 --- a/lib/common_test/src/ct_netconfc.erl +++ b/lib/common_test/src/ct_netconfc.erl @@ -1074,12 +1074,18 @@ handle_msg({get_event_streams=Op,Streams,Timeout}, From, State) -> handle_msg({ssh_cm, _CM, {data, _Ch, _Type, Data}}, State) -> handle_data(Data, State); -handle_msg({ssh_cm, _CM, {closed,_Ch}}, State) -> - %% This will happen if the server terminates the connection, as in - %% kill-session (or if ssh:close is called from somewhere +handle_msg({ssh_cm, _CM, _SshCloseMsg}, State) -> + %% _SshCloseMsg can probably be one of + %% {eof,Ch} + %% {exit_status,Ch,Status} + %% {exit_signal,Ch,ExitSignal,ErrorMsg,LanguageString} + %% {signal,Ch,Signal} + + %% This might e.g. happen if the server terminates the connection, + %% as in kill-session (or if ssh:close is called from somewhere %% unexpected). - %%! Log this?? - i.e. as server closing the connection + %%! Log this?? %%! Currently the log will say that the client closed the %%! connection - due to terminate/2 -- cgit v1.2.3