Yes,The user level will never see LIBSSH2_ERROR_BAD_USE.
I handle it in the function _libssh2_channel_receive_window_adjust(),
just return it when LIBSSH2_ERROR_BAD_USE occur, and the
channel->adjust_state will still be libssh2_NB_state_created, in the next
time
when sending , the function _libssh2_channel_write() will send the
receive window adjust request in high priority before blocking.
that can prevent LIBSSH2_ERROR_BAD_USE recurrence,then the
receive window will expand normally.
please see:
http://www.libssh2.org/mail/libssh2-devel-archive-2011-08/0109.shtml
Regards
liuzl
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2011-09-01