libssh2_packet_read() needing at least blocksize bytes (if encryption is active) is also incorrect. Suppose we use a mac of 20 bytes and a blocksize of 16 bytes and the packet arrives in two parts, the second part containing the last 2 bytes of the mac. Now, the first libssh2_packet_read() call processes all bytes of the packet except for the last 2. The second call will read the last 2 bytes of the packet and won't process them as it has read less than a block (2<16). This call and all subsequent calls of libssh2_packet_read() will return PACKET_EAGAIN.
Eberhard ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ libssh2-devel mailing list libssh2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libssh2-devel