From 9a0a82b7ace0dfcf88ea9aba2ec9fbd936e573ea Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 28 Oct 2017 07:29:50 +0200 Subject: [PATCH] Fixed an even mess up in the PCap and SLiRP code. --- src/network/net_pcap.c | 2 ++ src/network/net_slirp.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/network/net_pcap.c b/src/network/net_pcap.c index f1bf76271..cef7bbe8b 100644 --- a/src/network/net_pcap.c +++ b/src/network/net_pcap.c @@ -253,6 +253,8 @@ network_pcap_setup(uint8_t *mac, NETRXCB func, void *arg) pclog(" Starting thread..\n"); poll_tid = thread_create(poll_thread, mac); + thread_started = thread_create_event(); + thread_wait_event((event_t *) thread_started, -1); return(0); diff --git a/src/network/net_slirp.c b/src/network/net_slirp.c index a72fe7180..ed19a9e4e 100644 --- a/src/network/net_slirp.c +++ b/src/network/net_slirp.c @@ -150,6 +150,8 @@ network_slirp_setup(uint8_t *mac, NETRXCB func, void *arg) pclog("SLiRP: starting thread..\n"); poll_tid = thread_create(poll_thread, mac); + thread_start = thread_create_event(); + thread_wait_event((event_t *) thread_started, -1); return(0);