aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src/ct_netconfc.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2012-12-19 16:35:36 +0100
committerSiri Hansen <[email protected]>2012-12-19 16:35:36 +0100
commit251298cb6a1eae8cc6e9fa71becdce2a4e934f94 (patch)
tree54f23e948cb88ef1b0baf8f3ffedcc30ba938c4d /lib/common_test/src/ct_netconfc.erl
parentb5bfeb6de3a2a79c9581d779112d1cc192225dbd (diff)
downloadotp-251298cb6a1eae8cc6e9fa71becdce2a4e934f94.tar.gz
otp-251298cb6a1eae8cc6e9fa71becdce2a4e934f94.tar.bz2
otp-251298cb6a1eae8cc6e9fa71becdce2a4e934f94.zip
[common_test] Adjust window after netconf client receives data
If ssh_connection:adjust_window/3 is not called after each time data is received in the netconf client, the client will eventually stop receiving data. This bug has been corrected.
Diffstat (limited to 'lib/common_test/src/ct_netconfc.erl')
-rw-r--r--lib/common_test/src/ct_netconfc.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/common_test/src/ct_netconfc.erl b/lib/common_test/src/ct_netconfc.erl
index 11c8235040..1ccbc86d8f 100644
--- a/lib/common_test/src/ct_netconfc.erl
+++ b/lib/common_test/src/ct_netconfc.erl
@@ -1073,7 +1073,8 @@ handle_msg({get_event_streams=Op,Streams,Timeout}, From, State) ->
SimpleXml = encode_rpc_operation(get,[Filter]),
do_send_rpc(Op, SimpleXml, Timeout, From, State).
-handle_msg({ssh_cm, _CM, {data, _Ch, _Type, Data}}, State) ->
+handle_msg({ssh_cm, CM, {data, Ch, _Type, Data}}, State) ->
+ ssh_connection:adjust_window(CM,Ch,size(Data)),
handle_data(Data, State);
handle_msg({ssh_cm, _CM, _SshCloseMsg}, State) ->
%% _SshCloseMsg can probably be one of
@@ -1805,7 +1806,8 @@ get_tag([]) ->
%%% SSH stuff
ssh_receive_data() ->
receive
- {ssh_cm, _CM, {data, _Ch, _Type, Data}} ->
+ {ssh_cm, CM, {data, Ch, _Type, Data}} ->
+ ssh_connection:adjust_window(CM,Ch,size(Data)),
{ok, Data};
{ssh_cm, _CM, {Closed, _Ch}} = X when Closed == closed; Closed == eof ->
{error,X};