diff options
author | Ingela Anderton Andin <[email protected]> | 2015-05-08 17:12:26 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2015-05-12 08:48:47 +0200 |
commit | 4dde4fa2ac753223404a24bdb6a9e7323f04489e (patch) | |
tree | 27c29bf1d3fedf73fcc479cc98d0aa557763613b /lib/ssh/src | |
parent | 0d91ab8cf4900c58b7b5a20369b15f641b22a204 (diff) | |
download | otp-4dde4fa2ac753223404a24bdb6a9e7323f04489e.tar.gz otp-4dde4fa2ac753223404a24bdb6a9e7323f04489e.tar.bz2 otp-4dde4fa2ac753223404a24bdb6a9e7323f04489e.zip |
ssh: Fix typo
Option height was misspelled in the code. Fix code but recognize
the mispellt option for backwards compatible reasons.
Diffstat (limited to 'lib/ssh/src')
-rw-r--r-- | lib/ssh/src/ssh_connection.erl | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/lib/ssh/src/ssh_connection.erl b/lib/ssh/src/ssh_connection.erl index 388c080d99..d532d41009 100644 --- a/lib/ssh/src/ssh_connection.erl +++ b/lib/ssh/src/ssh_connection.erl @@ -196,15 +196,16 @@ reply_request(_,false, _, _) -> %%-------------------------------------------------------------------- ptty_alloc(ConnectionHandler, Channel, Options) -> ptty_alloc(ConnectionHandler, Channel, Options, infinity). -ptty_alloc(ConnectionHandler, Channel, Options, TimeOut) -> +ptty_alloc(ConnectionHandler, Channel, Options0, TimeOut) -> + Options = backwards_compatible(Options0, []), {Width, PixWidth} = pty_default_dimensions(width, Options), - {Hight, PixHight} = pty_default_dimensions(hight, Options), + {Height, PixHeight} = pty_default_dimensions(height, Options), pty_req(ConnectionHandler, Channel, proplists:get_value(term, Options, os:getenv("TERM", ?DEFAULT_TERMINAL)), proplists:get_value(width, Options, Width), - proplists:get_value(hight, Options, Hight), + proplists:get_value(height, Options, Height), proplists:get_value(pixel_widh, Options, PixWidth), - proplists:get_value(pixel_hight, Options, PixHight), + proplists:get_value(pixel_height, Options, PixHeight), proplists:get_value(pty_opts, Options, []), TimeOut ). %%-------------------------------------------------------------------- @@ -1339,3 +1340,12 @@ decode_ip(Addr) when is_binary(Addr) -> {error,_} -> Addr; {ok,A} -> A end. + +backwards_compatible([], Acc) -> + Acc; +backwards_compatible([{hight, Value} | Rest], Acc) -> + backwards_compatible(Rest, [{height, Value} | Acc]); +backwards_compatible([{pixel_hight, Value} | Rest], Acc) -> + backwards_compatible(Rest, [{height, Value} | Acc]); +backwards_compatible([Value| Rest], Acc) -> + backwards_compatible(Rest, [ Value | Acc]). |