[erlang-patches] ssh_connection:send/4 on R13B04 with the last argument as "infinity" fails

Niclas Eklund nick@REDACTED
Mon Mar 22 10:05:44 CET 2010


Hello!

Thank you for pointing this out. I've applied the change you suggested.

Best regards,

Niclas @ Erlang/OTP

On Sun, 21 Mar 2010, Kenji Rikitake wrote:

> On R13B04, when using
> ssh_connection:send(ConnectionManager, ChannelId, Data, Timeout)
> with Timeout as 'infinity' (atom), the function crashes
> with the error on erlang:size([infinity]).
>
> The following small patch will fix this, by explicitly treating
> the 'infinity' atom in the pattern matching of
> lib/src/ssh_connection.erl.
>
> Kenji Rikitake
>
> --- ssh_connection.erl.old	2010-03-21 14:28:43.000000000 +0900
> +++ ssh_connection.erl	2010-03-21 14:29:59.000000000 +0900
> @@ -123,6 +123,8 @@
>     send(ConnectionManager, ChannelId, 0, Data, infinity).
> send(ConnectionManager, ChannelId, Data, TimeOut) when is_integer(TimeOut) ->
>     send(ConnectionManager, ChannelId, 0, Data, TimeOut);
> +send(ConnectionManager, ChannelId, Data, infinity) ->
> +    send(ConnectionManager, ChannelId, 0, Data, infinity);
> send(ConnectionManager, ChannelId, Type, Data) ->
>     send(ConnectionManager, ChannelId, Type, Data, infinity).
> send(ConnectionManager, ChannelId, Type, Data, TimeOut) ->
>
> ________________________________________________________________
> erlang-patches (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED
>




More information about the erlang-bugs mailing list