- (Feb 12 2009) Romain Bondue extended Markus Moeller fix from Feb 8, based on
a previous (uncommitted) patch by Erik Brossler. It improves libssh2_channel_write_ex in blocking situations when the socket is set non- blocking.
This commit is contained in:
parent
c547e07caa
commit
c672b837f8
10
NEWS
10
NEWS
@ -1,7 +1,11 @@
|
||||
|
||||
- (Deb 8 2009)
|
||||
Markus Moeller fixed a flaw in libssh2_channel_write_ex() that would occur
|
||||
on EAGAIN situations.
|
||||
- (Feb 12 2009) Romain Bondue extended Markus Moeller fix from Feb 8, based on
|
||||
a previous (uncommitted) patch by Erik Brossler. It improves
|
||||
libssh2_channel_write_ex in blocking situations when the socket is set non-
|
||||
blocking.
|
||||
|
||||
- (Feb 8 2009) Markus Moeller fixed a flaw in libssh2_channel_write_ex() that
|
||||
would occur on EAGAIN situations.
|
||||
|
||||
Version 1.0 ( )
|
||||
-------------------------------
|
||||
|
@ -1771,8 +1771,9 @@ libssh2_channel_write_ex(LIBSSH2_CHANNEL * channel, int stream_id,
|
||||
channel->write_state = libssh2_NB_state_allocated;
|
||||
}
|
||||
|
||||
/* deduct the amount thet has already been sent */
|
||||
/* Deduct the amount that has already been sent, and set buf accordingly. */
|
||||
buflen -= channel->write_bufwrote;
|
||||
buf += channel->write_bufwrote;
|
||||
|
||||
while (buflen > 0) {
|
||||
if (channel->write_state == libssh2_NB_state_allocated) {
|
||||
@ -1798,6 +1799,7 @@ libssh2_channel_write_ex(LIBSSH2_CHANNEL * channel, int stream_id,
|
||||
if (rc < 0) {
|
||||
/* Error or EAGAIN occurred, disconnect? */
|
||||
if (rc != PACKET_EAGAIN) {
|
||||
LIBSSH2_FREE(session, channel->write_packet);
|
||||
channel->write_state = libssh2_NB_state_idle;
|
||||
}
|
||||
return rc;
|
||||
|
Loading…
x
Reference in New Issue
Block a user