Subject: | Net-SSH2-0.54_01 bug for net_ch_write |
Date: | Mon, 07 Sep 2015 20:07:52 +0800 |
To: | "bug-Net-SSH2" <bug-Net-SSH2@rt.cpan.org> |
From: | "goldenspider" <goldenspider@aliyun.com> |
net_ch_write:
1.
while (offset < len_buffer) {
int count = libssh2_channel_write_ex(ch->channel, XLATEXT, //one
pv_buffer + offset,
len_buffer - offset);
if (count >= 0)
offset += count;
else if (!((count == LIBSSH2_ERROR_EAGAIN) && //two
libssh2_session_get_blocking(ch->ss->session)))
break;
}
//outside count will always equ 0.
2.
else if (LIBSSH2_ERROR_EAGAIN == count
&& libssh2_session_get_blocking(ch->ss->session) == 0)
is better?