diff options
| author | aozima <[email protected]> | 2018-07-02 10:02:16 +0800 |
|---|---|---|
| committer | aozima <[email protected]> | 2018-07-02 16:58:47 +0800 |
| commit | 000fe93b9f416be3d08805b71b8d1eb51b9818fe (patch) | |
| tree | e5b3e4ece17539f5ea2c2778e8055dcfe84f9cc6 /components/net | |
| parent | e49a29f2dc306213a73a4f3c68d1ac9a34f49d9a (diff) | |
[lwip] add re-initial check.
Diffstat (limited to 'components/net')
| -rw-r--r-- | components/net/lwip-2.0.2/src/arch/sys_arch.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/components/net/lwip-2.0.2/src/arch/sys_arch.c b/components/net/lwip-2.0.2/src/arch/sys_arch.c index c8e1fe1d33..316b970048 100644 --- a/components/net/lwip-2.0.2/src/arch/sys_arch.c +++ b/components/net/lwip-2.0.2/src/arch/sys_arch.c @@ -136,11 +136,19 @@ static void tcpip_init_done_callback(void *arg) * LwIP system initialization */ extern int eth_system_device_init_private(void); +static volatile uint8_t init_ok = 0; int lwip_system_init(void) { rt_err_t rc; struct rt_semaphore done_sem; - + + if(init_ok) + { + rt_kprintf("lwip system already init.\n"); + return 0; + } + init_ok = 1; + eth_system_device_init_private(); /* set default netif to NULL */ |
