Subject: [ libssh2-Bugs-2823850 ] channel_read() bug

[ libssh2-Bugs-2823850 ] channel_read() bug

From: <>
Date: Tue, 28 Jul 2009 17:34:20 +0000

Bugs item #2823850, was opened at 2009-07-19 13:06
Message generated for change (Comment added) made by bagder
You can respond by visiting:

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
>Category: misc
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: xiao pan (kakaxiao)
>Assigned to: Daniel Stenberg (bagder)
Summary: channel_read() bug

Initial Comment:
when I use libssh2_channel_exec() to execute a command like "ls -l", I get nothing from libssh2_channel_exec(), but I can get data when I execute "ls -al".
I find the reason is that when I execute "ls -l" , the channel stil has data in buffer, but the remote-close flag in channel is true, so channel_read() read nothing but just return.
but when I execute "ls -al", I can get data, so I think may be it because "ls -al " transports more data than "ls -l".

bug fix: I comment the code "!channel->remote.close &&" in while loop and I can get data whatever command I use.


Comment By: Daniel Stenberg (bagder)
Date: 2009-07-28 19:34

Thanks for your report and help in improving libssh2!

A fix has just been committed to the source code repo, this case is now
considered fixed and closed!


You can respond by visiting:
Received on 2009-07-28