Fixed polling error in libssh2_channel_read_ex()
Этот коммит содержится в:
родитель
6fdf9c9c06
Коммит
912e9ca713
5
README
5
README
@ -1,6 +1,11 @@
|
||||
libssh2 - SSH2 library
|
||||
======================
|
||||
|
||||
Version 0.3
|
||||
-----------
|
||||
|
||||
Fixed libssh2_channel_read_ex(). Packet loop initialized BEFORE transport polled for new packets (should have been after).
|
||||
|
||||
Version 0.2
|
||||
-----------
|
||||
|
||||
|
@ -546,10 +546,11 @@ LIBSSH2_API int libssh2_channel_read_ex(LIBSSH2_CHANNEL *channel, int stream_id,
|
||||
int bytes_read = 0, blocking_read = 0;
|
||||
|
||||
do {
|
||||
LIBSSH2_PACKET *packet = session->packets.head;
|
||||
LIBSSH2_PACKET *packet;
|
||||
|
||||
/* Process any waiting packets */
|
||||
while (libssh2_packet_read(session, blocking_read) > 0) blocking_read = 0;
|
||||
packet = session->packets.head;
|
||||
|
||||
while (packet && (bytes_read < buflen)) {
|
||||
/* In case packet gets destroyed during this iteration */
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user