mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
Changes for clean build on ZDS
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1637 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
+6
-1
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* examples/uip/main.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Based on uIP which also has a BSD style license:
|
||||
@@ -191,6 +191,7 @@ int user_start(int argc, char *argv[])
|
||||
|
||||
/* Get an IP address */
|
||||
|
||||
printf("Getting IP address\n");
|
||||
if (handle)
|
||||
{
|
||||
struct dhcpc_state ds;
|
||||
@@ -213,11 +214,14 @@ int user_start(int argc, char *argv[])
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_EXAMPLE_UIP_WEBSERVER)
|
||||
printf("Starting webserver\n");
|
||||
httpd_init();
|
||||
httpd_listen();
|
||||
#elif defined(CONFIG_EXAMPLE_UIP_TELNETD)
|
||||
printf("Starting telnetd\n");
|
||||
telnetd_init();
|
||||
#elif defined(CONFIG_EXAMPLE_UIP_SMTP)
|
||||
printf("Sending mail\n");
|
||||
uip_ipaddr(addr.s_addr, 127, 0, 0, 1);
|
||||
handle = smtp_open();
|
||||
if (handle)
|
||||
@@ -228,6 +232,7 @@ int user_start(int argc, char *argv[])
|
||||
smtp_close(handle);
|
||||
}
|
||||
#elif defined(CONFIG_EXAMPLE_UIP_WEBCLIENT)
|
||||
printf("Getting webpage\n");
|
||||
webclient_init();
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLE_UIP_DNSADDR);
|
||||
resolv_conf(&addr);
|
||||
|
||||
Reference in New Issue
Block a user