From 9562d8d1df5df9d71623b4eb8b44824e8c2b918c Mon Sep 17 00:00:00 2001 From: whitequark Date: Fri, 23 Sep 2016 08:14:09 +0000 Subject: [PATCH] Rust: liblwip: call tcp_recved where appropriate. --- artiq/runtime.rs/liblwip/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/artiq/runtime.rs/liblwip/lib.rs b/artiq/runtime.rs/liblwip/lib.rs index 49af078a0..7c1c32c53 100644 --- a/artiq/runtime.rs/liblwip/lib.rs +++ b/artiq/runtime.rs/liblwip/lib.rs @@ -505,7 +505,10 @@ impl TcpStream { Some(_) => () } match state.recv_buffer.pop_front() { - Some(Ok(pbuf)) => return Ok(Some(pbuf)), + Some(Ok(pbuf)) => { + unsafe { lwip_sys::tcp_recved(self.raw, pbuf.len() as u16) } + return Ok(Some(pbuf)) + }, _ => unreachable!() } }