Ticket #109 (closed defect)

Opened 8 years ago

Last modified 8 years ago

channel_read() bug

Reported by: kakaxiao Owned by: bagder
Priority: normal Milestone:
Component: misc Version:
Keywords: Cc: kakaxiao, bagder
Blocked By: Blocks:


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.

Change History

comment:1 Changed 8 years ago by bagder

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!

Note: See TracTickets for help on using tickets.