From a4e61c265be4defa613f8548b8fef9b3cc32b5ed Mon Sep 17 00:00:00 2001 From: Mikhail Gusarov Date: Mon, 20 Feb 2006 08:39:54 +0000 Subject: [PATCH] Fixed errorneous flushing packets for unrelated channels when one is closed (thanks to Alexander Holyapin) --- src/packet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/packet.c b/src/packet.c index cc5c6b6..043412c 100644 --- a/src/packet.c +++ b/src/packet.c @@ -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;