--- orig/ssh_cm.erl 2008-02-05 22:43:43.000000000 +0900 +++ ssh_cm.erl 2008-07-10 16:17:51.740245016 +0900 @@ -1338,7 +1338,18 @@ -encode_pty_opts([{Opt,Value} | Opts]) -> + +encode_pty_opts([]) -> + <<0, 0, 0, 0>>; +encode_pty_opts(Opts) -> +io:format("opts: ~p~n", [Opts]), + OptBin = iolist_to_binary(encode_pty_opts2(Opts)), +io:format("optbin: ~p~n", [OptBin]), + Size = byte_size(OptBin), +io:format("Size: ~p~n", [Size]), + <>. + +encode_pty_opts2([{Opt,Value} | Opts]) -> Code = case Opt of vintr -> ?VINTR; vquit -> ?VQUIT; @@ -1396,8 +1407,8 @@ tty_op_ispeed -> ?TTY_OP_ISPEED; tty_op_ospeed -> ?TTY_OP_OSPEED end, - [Code, ?uint32(Value) | encode_pty_opts(Opts)]; -encode_pty_opts([]) -> + [Code, ?uint32(Value) | encode_pty_opts2(Opts)]; +encode_pty_opts2([]) -> [?TTY_OP_END].