From 976e7b42886e66e352b7b2e6334ee0f9b06f0a40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Mon, 11 Jun 2012 12:02:03 +0200 Subject: [PATCH] Noux: fix send(), set fd before each syscall The fd has to be set before each syscall. Fixes #288. --- ports/src/lib/libc_noux/plugin.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/src/lib/libc_noux/plugin.cc b/ports/src/lib/libc_noux/plugin.cc index b17dda7cee..9c719eb8c5 100644 --- a/ports/src/lib/libc_noux/plugin.cc +++ b/ports/src/lib/libc_noux/plugin.cc @@ -1347,11 +1347,11 @@ namespace { int const orig_count = len; char *src = (char *)buf; - sysio()->send_in.fd = noux_fd(fd->context); while (len > 0) { Genode::size_t curr_len = Genode::min(sizeof (sysio()->send_in.buf), len); + sysio()->send_in.fd = noux_fd(fd->context); sysio()->send_in.len = curr_len; Genode::memcpy(sysio()->send_in.buf, src, curr_len);