ssh_cli error during start_shell
Anton Ryabkov <[email protected]> Tue, 17 Dec 2013 10:33:59 +0700
| Newsgroups | gmane.comp.lang.erlang.bugs,gmane.comp.lang.erlang.patches |
|---|---|
| Message-ID | <CAH_Ks=Qun7TFprUWNt3arOT2hfSG7ULtNWd7hE1CYNqZznyVgA@mail.gmail.com> |
Hello,
on Erlang R16B03 I've found that ssh_cli crushed with function_clause, when
I trying connected by ssh to my ssh daemon. Error:
...
** {function_clause,[{proplists,get_value,
[user,{ok,[]},undefined],
[{file,"proplists.erl"},{line,225}]},
{ssh_cli,start_shell,2,[{file,"ssh_cli.erl"},{line,457}]},
{ssh_cli,handle_ssh_msg,2,
[{file,"ssh_cli.erl"},{line,107}]},
{ssh_channel,handle_info,2,
[{file,"ssh_channel.erl"},{line,241}]},
{gen_server,handle_msg,5,
[{file,"gen_server.erl"},{line,604}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,239}]}]}
Note: all error in the file error.
Steps to reproduce:
1. compile ssh_bug.erl
2. ssh_bug:test().
3. connect by ssh: ssh localhost -p9876
4. look at erlang concole for error.
The reason of the bug is getting ConnectionInfo in the ssh_cli. Instead of
use ssh_connection_handler:connection_info method to get ConnectionInfo
used ssh_connection_handler:info.
Patch for current bug:
452c452
< ConnectionInfo = ssh_connection_handler:info(ConnectionHandler,
---
> ConnectionInfo =
ssh_connection_handler:connection_info(ConnectionHandler,
456c456
< {ok, User} =
---
> User =
462c462
< [{_, PeerAddr}] =
---
> {_, PeerAddr} =
480c480
< ConnectionInfo = ssh_connection_handler:info(ConnectionHandler,
---
> ConnectionInfo =
ssh_connection_handler:connection_info(ConnectionHandler,
482c482
< {ok, User} =
---
> User =
491c491
< [{_, PeerAddr}] =
---
> {_, PeerAddr} =
Sample, error and patch in the attach.
_______________________________________________
erlang-bugs mailing list
[email protected]
http://erlang.org/mailman/listinfo/erlang-bugs
ssh_bug_3_0.tar.gz
(application/x-gzip, 3.2 KB) - not displayed