aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/src
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2016-05-13 15:37:20 +0200
committerHans Nilsson <[email protected]>2016-05-13 15:37:20 +0200
commit40570e5b0829c5b6c189a4b4660bb937f2d85592 (patch)
treef42c235df3657a78375ce1d1cea059b0cfe6179b /lib/ssh/src
parentf68a3780fbcc836c7036b55db5ee1d0447213c8f (diff)
downloadotp-40570e5b0829c5b6c189a4b4660bb937f2d85592.tar.gz
otp-40570e5b0829c5b6c189a4b4660bb937f2d85592.tar.bz2
otp-40570e5b0829c5b6c189a4b4660bb937f2d85592.zip
ssh: badmatch in connection_handler (badly renamed variable)
Diffstat (limited to 'lib/ssh/src')
-rw-r--r--lib/ssh/src/ssh_connection_handler.erl40
1 files changed, 18 insertions, 22 deletions
diff --git a/lib/ssh/src/ssh_connection_handler.erl b/lib/ssh/src/ssh_connection_handler.erl
index 946adcf384..e952a333ff 100644
--- a/lib/ssh/src/ssh_connection_handler.erl
+++ b/lib/ssh/src/ssh_connection_handler.erl
@@ -1514,39 +1514,35 @@ call(FsmPid, Event, Timeout) ->
end.
-handle_connection_msg(Msg, StateName, State0 =
- #data{starter = User,
- connection_state = Connection0,
- event_queue = Qev0}) ->
+handle_connection_msg(Msg, StateName, D0 = #data{starter = User,
+ connection_state = Connection0,
+ event_queue = Qev0}) ->
Renegotiation = renegotiation(StateName),
Role = role(StateName),
- try ssh_connection:handle_msg(Msg, Connection0, Role) of
+ try ssh_connection:handle_msg(Msg, Connection0, Role) of
{{replies, Replies}, Connection} ->
- case StateName of
- {connected,_} ->
- {Repls, State} = send_replies(Replies,
- State0#data{connection_state=Connection}),
- {keep_state, State, Repls};
- _ ->
- {ConnReplies, Replies} =
- lists:splitwith(fun not_connected_filter/1, Replies),
- {Repls, State} = send_replies(Replies,
- State0#data{event_queue = Qev0 ++ ConnReplies}),
- {keep_state, State, Repls}
- end;
+ {Repls, D} =
+ case StateName of
+ {connected,_} ->
+ send_replies(Replies, D0#data{connection_state=Connection});
+ _ ->
+ {ConnReplies, NonConnReplies} = lists:splitwith(fun not_connected_filter/1, Replies),
+ send_replies(NonConnReplies, D0#data{event_queue = Qev0 ++ ConnReplies})
+ end,
+ {keep_state, D, Repls};
{noreply, Connection} ->
- {keep_state, State0#data{connection_state = Connection}};
+ {keep_state, D0#data{connection_state = Connection}};
{disconnect, Reason0, {{replies, Replies}, Connection}} ->
- {Repls,State} = send_replies(Replies, State0#data{connection_state = Connection}),
+ {Repls, D} = send_replies(Replies, D0#data{connection_state = Connection}),
case {Reason0,Role} of
{{_, Reason}, client} when ((StateName =/= {connected,client}) and (not Renegotiation)) ->
User ! {self(), not_connected, Reason};
_ ->
ok
end,
- {stop_and_reply, {shutdown,normal}, Repls, State#data{connection_state = Connection}}
+ {stop_and_reply, {shutdown,normal}, Repls, D#data{connection_state = Connection}}
catch
_:Error ->
@@ -1555,8 +1551,8 @@ handle_connection_msg(Msg, StateName, State0 =
#ssh_msg_disconnect{code = ?SSH_DISCONNECT_BY_APPLICATION,
description = "Internal error"},
Connection0, Role),
- {Repls,State} = send_replies(Replies, State0#data{connection_state = Connection}),
- {stop_and_reply, {shutdown,Error}, Repls, State#data{connection_state = Connection}}
+ {Repls, D} = send_replies(Replies, D0#data{connection_state = Connection}),
+ {stop_and_reply, {shutdown,Error}, Repls, D#data{connection_state = Connection}}
end.