Browse Source

Move app initialization code in simhost.c to one place

master
Dirk Ziegelmeier 8 years ago
parent
commit
fd3d2ff645
  1. 2
      examples/tftp/tftp_example.c
  2. 38
      ports/unix/unixsim/simhost.c

2
examples/tftp/tftp_example.c

@ -27,6 +27,8 @@
*
*/
#include <stdio.h>
#include "lwip/apps/tftp_server.h"
#include "tftp_example.h"

38
ports/unix/unixsim/simhost.c

@ -215,6 +215,25 @@ tcpip_init_done(void *arg)
init_netifs();
#if LWIP_TCP
netio_init();
#endif
#if LWIP_TCP && LWIP_NETCONN
tcpecho_init();
shell_init();
httpd_init();
#endif
#if LWIP_UDP && LWIP_NETCONN
udpecho_init();
#endif
#if LWIP_SOCKET
chargen_init();
#endif
#if LWIP_MQTT
mqtt_example_init();
#endif
#if LWIP_IPV4
netbiosns_set_name("simhost");
netbiosns_init();
@ -499,25 +518,6 @@ init_netifs(void)
/* Only used for testing purposes: */
netif_add(&ipaddr, &netmask, &gw, NULL, pcapif_init, tcpip_input);
#endif
#if LWIP_TCP
netio_init();
#endif
#if LWIP_TCP && LWIP_NETCONN
tcpecho_init();
shell_init();
httpd_init();
#endif
#if LWIP_UDP && LWIP_NETCONN
udpecho_init();
#endif
#if LWIP_SOCKET
chargen_init();
#endif
#if LWIP_MQTT
mqtt_example_init();
#endif
/* sys_timeout(5000, tcp_debug_timeout, NULL);*/
}

Loading…
Cancel
Save