tcpip.c: Moved call to ip_init(), udp_init() and tcp_init() from tcpip_thread() to tcpip_init()

This commit is contained in:
goldsimon 2007-03-03 16:22:38 +00:00
parent e075581d76
commit bb8522b737
2 changed files with 35 additions and 30 deletions

View File

@ -42,6 +42,12 @@ HISTORY
++ Bug fixes:
2007-03-02 Simon Goldschmidt
* tcpip.c: Moved call to ip_init(), udp_init() and tcp_init() from
tcpip_thread() to tcpip_init(). This way, raw API connections can be
initialized before tcpip_thread is running (e.g. before OS is started)
=======
2007-03-02 Frédéric Bernon
* rawapi.txt: Fix documentation mismatch with etharp.h about etharp_tmr's call interval.

View File

@ -97,15 +97,6 @@ tcpip_thread(void *arg)
{
struct tcpip_msg *msg;
(void)arg;
ip_init();
#if LWIP_UDP
udp_init();
#endif
#if LWIP_TCP
tcp_init();
#endif
#if IP_REASSEMBLY
sys_timeout(1000, ip_timer, NULL);
#endif
@ -186,6 +177,14 @@ tcpip_apimsg(struct api_msg *apimsg)
void
tcpip_init(void (* initfunc)(void *), void *arg)
{
ip_init();
#if LWIP_UDP
udp_init();
#endif
#if LWIP_TCP
tcp_init();
#endif
tcpip_init_done = initfunc;
tcpip_init_done_arg = arg;
mbox = sys_mbox_new();