diff options
author | Uros Majstorovic <majstor@majstor.org> | 2022-01-31 07:55:13 +0100 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2022-01-31 07:55:13 +0100 |
commit | 63e0f6da6c90729a259a2fc36eabc26d18898698 (patch) | |
tree | 9437ec13c362e8e4c44b22eb8bad67d44fad2e04 /ecp/src/rbuf_recv.c | |
parent | ff13f724305bb179949e90ee5079e33097899499 (diff) |
fixed rbuf
Diffstat (limited to 'ecp/src/rbuf_recv.c')
-rw-r--r-- | ecp/src/rbuf_recv.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ecp/src/rbuf_recv.c b/ecp/src/rbuf_recv.c index 98b472c..a3f2345 100644 --- a/ecp/src/rbuf_recv.c +++ b/ecp/src/rbuf_recv.c @@ -308,7 +308,10 @@ ssize_t ecp_rbuf_store(ECPConnection *conn, ecp_seq_t seq, unsigned char *msg, s if (rv < 0) return rv; buf->ack_map |= ack_bit; - do_ack = ack_shift(buf); + /* reliable transport can prevent seq_ack from reaching seq_max */ + if (ECP_SEQ_LT(buf->seq_ack, rbuf->seq_max)) { + do_ack = ack_shift(buf); + } } else { return ECP_ERR_RBUF_DUP; } |