1
1

libssh2_packet_read() was checking the "errno" even when recv() didn't

return an error.  "errno" should have been zero by the recv() call but
doesn't seem to be on all systems.  Only check when recv() says there
is an error.

Bug:		1703467
Patch:		1703468
Этот коммит содержится в:
James Housley 2007-06-06 10:13:30 +00:00
родитель 412b25d971
Коммит 9896c291e4

Просмотреть файл

@ -312,7 +312,7 @@ libssh2pack_t libssh2_packet_read(LIBSSH2_SESSION *session)
/* check if this is due to EAGAIN and return
the special return code if so, error out
normally otherwise */
if(errno == EAGAIN) {
if ((nread < 0) && (errno == EAGAIN)) {
return PACKET_EAGAIN;
}
return PACKET_FAIL;