From f3d01fd4edd654963cef0575733cf54ffcf38eb6 Mon Sep 17 00:00:00 2001 From: Marko Kreen Date: Wed, 4 Jun 2008 14:22:30 +0000 Subject: [PATCH] fix < vs <= difference between iobuf.h and sbuf.c This might fix the problem Jacob Coby reported: http://lists.pgfoundry.org/pipermail/pgbouncer-general/2008-March/000161.html --- include/iobuf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/iobuf.h b/include/iobuf.h index 2fc0e45..04424ad 100644 --- a/include/iobuf.h +++ b/include/iobuf.h @@ -165,7 +165,7 @@ static inline void iobuf_try_resync(IOBuf *io, unsigned small_pkt) if (avail == 0) { if (io->recv_pos > 0) io->recv_pos = io->parse_pos = io->done_pos = 0; - } else if (avail < small_pkt && io->done_pos > 0) { + } else if (avail <= small_pkt && io->done_pos > 0) { memmove(io->buf, io->buf + io->done_pos, avail); io->parse_pos -= io->done_pos; io->recv_pos = avail; -- 2.40.0