1
1

Another transport layer fix for bogus -39 (LIBSSH2_ERROR_BAD_USE) errors

Commit 683aa0f6b52fb1014873c961709102b5006372fc made send_existing() send
more than just the second part of a packet when the kernel did not accept
the full packet, but the function still overlooked the SSH protocol
overhead in each packet, often 48 bytes.

If only the last few bytes of a packet remained, then the packet would
erroneously be considered completely sent, and the next call to write
more data in the session would return a -39 error.
Этот коммит содержится в:
Peter Stuge 2009-12-08 07:33:05 +01:00
родитель 95f559a926
Коммит 1256c61815

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

@ -626,7 +626,7 @@ send_existing(LIBSSH2_SESSION * session, unsigned char *data,
p->osent += rc; /* we sent away this much data */
return p->osent < data_len ? PACKET_EAGAIN : PACKET_NONE;
return rc < length ? PACKET_EAGAIN : PACKET_NONE;
}
/*