Noux/net: adjust noux/net to lwip-1.4.1-rc1

Fixes #328.
This commit is contained in:
Josef Söntgen 2012-08-14 11:55:41 +02:00 committed by Norman Feske
parent bee2c10ce1
commit ae89f88cfb

View File

@ -24,13 +24,13 @@
#include <socket_io_channel.h> #include <socket_io_channel.h>
#include <shared_pointer.h> #include <shared_pointer.h>
using namespace Noux;
/* Libc includes */ /* Libc includes */
#include <sys/select.h> #include <sys/select.h>
#include <sys/time.h> #include <sys/time.h>
#include <netdb.h> #include <netdb.h>
using namespace Noux;
void (*libc_select_notify)(); void (*libc_select_notify)();
void (*close_socket)(int); void (*close_socket)(int);
@ -105,7 +105,15 @@ static void _close_socket(int sd)
void init_network() void init_network()
{ {
lwip_tcpip_init(); PINF("--- noux: initialize network ---");
/**
* NOTE: we only call lwip_nic_init() because
* lwip_tcpip_init() was already called by libc_lwip's
* constructor and we don't want to have another tcpip
* thread.
*/
lwip_nic_init(0, 0, 0); lwip_nic_init(0, 0, 0);
if (!libc_select_notify) if (!libc_select_notify)
@ -154,6 +162,7 @@ bool Noux::Child::_syscall_net(Noux::Session::Syscall sc)
case SYSCALL_UNLINK: case SYSCALL_UNLINK:
case SYSCALL_RENAME: case SYSCALL_RENAME:
case SYSCALL_MKDIR: case SYSCALL_MKDIR:
case SYSCALL_FTRUNCATE:
break; break;
case SYSCALL_SOCKET: case SYSCALL_SOCKET:
{ {