Tommy Lindgren wrote:
> I think I have found an issue with libssh2_channel_write_ex. It seems
> like it can return LIBSSH2_ERROR_EAGAIN when it actually successfully
> wrote bytes to the socket. I suspect this happens when the send() call
> returns a value greater than 0 but less than the buffer length.
..
> I have tested this against the latest git code.

Yeah, channel_write() git now looks weird.

        rc = _libssh2_transport_send(session, channel->write_packet,
..
        else if (rc) {
            channel->write_state = libssh2_NB_state_idle;
            return _libssh2_error(session, rc,
                                  "Unable to send channel data");
        }

Also, I'm not happy that only one code path leading into
channel_write() actually has a debug message in _channel_write().


//Peter
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

Reply via email to