Erlang/OTP Forums

Author Message

<  Erlang bugs mailing list  ~  ssh_connection:send/4 on R13B04 with the last argument as "i

jj1bdx
Posted: Sun Mar 21, 2010 5:36 am Reply with quote
User Joined: 11 Sep 2008 Posts: 92
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-bugs (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:erlang-bugs-unsubscribe@erlang.org

Post received from mailinglist
View user's profile Send private message

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum