From 956f64906d33948fb999b19d561ad93dbe2e10e0 Mon Sep 17 00:00:00 2001 From: whitequark Date: Fri, 23 Sep 2016 05:20:15 +0000 Subject: [PATCH] Rust: fix incorrect use of lwip API. --- artiq/runtime.rs/liblwip/lib.rs | 2 +- artiq/runtime.rs/src/io.rs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/artiq/runtime.rs/liblwip/lib.rs b/artiq/runtime.rs/liblwip/lib.rs index dca02c857..49af078a0 100644 --- a/artiq/runtime.rs/liblwip/lib.rs +++ b/artiq/runtime.rs/liblwip/lib.rs @@ -375,7 +375,7 @@ impl TcpListener { backlog: LinkedList::new() })); let arg = &mut *state as *mut RefCell as *mut _; - lwip_sys::tcp_arg(raw, arg); + lwip_sys::tcp_arg(raw2, arg); lwip_sys::tcp_accept(raw2, accept); Ok(TcpListener { raw: raw2, state: state }) } diff --git a/artiq/runtime.rs/src/io.rs b/artiq/runtime.rs/src/io.rs index fc7e802ae..0607be728 100644 --- a/artiq/runtime.rs/src/io.rs +++ b/artiq/runtime.rs/src/io.rs @@ -257,7 +257,6 @@ impl<'a> TcpListener<'a> { pub fn accept(&self) -> Result<(TcpStream, SocketAddr)> { try!(self.waiter.tcp_acceptable(&self.lower)); - loop {} let stream_lower = self.lower.try_accept().unwrap(); let addr = SocketAddr::new(IP_ANY, 0); // FIXME: coax lwip into giving real addr here Ok((TcpStream {