Subject: Re: not getting all the data with libssh2_channel_exec and libssh2_channel_read

Re: not getting all the data with libssh2_channel_exec and libssh2_channel_read

From: Seth Grover <sethdgrover_at_gmail.com>
Date: Wed, 6 Jan 2010 13:53:53 -0700

I might have found the problem...

After reading http://www.libssh2.org/changes.html and seeing the
bugfix comment about "bad 0-return from libssh2_channel_read" I
downloaded libssh2 1.2.2 and tried it and it doesn't seem to have the
same problem.

Does anyone with particular knowledge of this bug think that it would
explain the problem I described using 1.1? If so I guess we can just
leave it at that.

It still does leave the question for me, which is the "correct" way to do it?

1. loop until libssh2_channel_read returns something <= 0 (other than
LIBSSH2_ERROR_EAGAIN)
or
2. loop until libssh2_channel_eof(channel)?

Both actually seem to work, which is correct?

-SG

--
This email is fiction. Any resemblance to actual events
or persons living or dead is purely coincidental.
Seth Grover
sethdgrover[at]gmail[dot]com
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-01-06