Start receiver thread in LwIP after initialization

Otherwise the receiver thread might access variables not initialized properly,
and thereby raising pagefaults.

Fixes #802
This commit is contained in:
Stefan Kalkowski 2013-07-11 14:44:45 +02:00 committed by Christian Helmuth
parent 03538a1c3b
commit 76d449ebe6
1 changed files with 2 additions and 1 deletions

View File

@ -263,7 +263,6 @@ extern "C" {
/* Setup receiver thread */
Nic_receiver_thread *th = new (env()->heap())
Nic_receiver_thread(nic, netif);
th->start();
/* Store receiver thread address in user-defined netif struct part */
netif->state = (void*) th;
@ -285,6 +284,8 @@ extern "C" {
for(int i=0; i<6; ++i)
netif->hwaddr[i] = _mac.addr[i];
th->start();
return ERR_OK;
}
} /* extern "C" */