]> granicus.if.org Git - pgbouncer/commitdiff
fix < vs <= difference between iobuf.h and sbuf.c
authorMarko Kreen <markokr@gmail.com>
Wed, 4 Jun 2008 14:22:30 +0000 (14:22 +0000)
committerMarko Kreen <markokr@gmail.com>
Wed, 4 Jun 2008 14:22:30 +0000 (14:22 +0000)
This might fix the problem Jacob Coby reported:

  http://lists.pgfoundry.org/pipermail/pgbouncer-general/2008-March/000161.html

include/iobuf.h

index 2fc0e45616ff3b30a95defc78a6970e3f4748ca4..04424adf4ee29e1670c6d0f5971df4ebd3f3627f 100644 (file)
@@ -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;