Fixed errorneous flushing packets for unrelated channels when one is closed

(thanks to Alexander Holyapin)
This commit is contained in:
Mikhail Gusarov 2006-02-20 08:39:54 +00:00
parent 502a48afa1
commit a4e61c265b

View File

@ -940,7 +940,7 @@ int libssh2_packet_ask_ex(LIBSSH2_SESSION *session, unsigned char packet_type, u
while (packet) {
if (packet->data[0] == packet_type &&
(packet->data_len >= (match_ofs + match_len)) &&
(!match_buf || (strncmp(packet->data + match_ofs, match_buf, match_len) == 0))) {
(!match_buf || (memcmp(packet->data + match_ofs, match_buf, match_len) == 0))) {
*data = packet->data;
*data_len = packet->data_len;