From 97a71fea76188de7568287d7e423ba5ae581ed96 Mon Sep 17 00:00:00 2001 From: dak664 Date: Fri, 11 Mar 2011 15:07:15 -0500 Subject: [PATCH] Conditional inclusion of the internal webserver --- examples/ipv6/rpl-border-router/border-router.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/examples/ipv6/rpl-border-router/border-router.c b/examples/ipv6/rpl-border-router/border-router.c index 6373d1e95..c2cc8973e 100644 --- a/examples/ipv6/rpl-border-router/border-router.c +++ b/examples/ipv6/rpl-border-router/border-router.c @@ -45,8 +45,11 @@ #include "net/netstack.h" #include "dev/button-sensor.h" #include "dev/slip.h" +#define INTERNAL_WEBSERVER 1 +#if INTERNAL_WEBSERVER #include "webserver-nogui.h" #include "httpd-simple.h" +#endif #include #include #include @@ -65,6 +68,7 @@ static uint8_t prefix_set; PROCESS(border_router_process, "Border router process"); AUTOSTART_PROCESSES(&border_router_process); +#if INTERNAL_WEBSERVER /*---------------------------------------------------------------------------*/ /* Only one single web request at time */ static const char *TOP = "ContikiRPL\n"; @@ -169,6 +173,7 @@ print_local_addresses(void) } } } +#endif /* INTERNAL_WEBSERVER */ /*---------------------------------------------------------------------------*/ void request_prefix(void) @@ -201,8 +206,9 @@ PROCESS_THREAD(border_router_process, ev, data) prefix_set = 0; PROCESS_PAUSE(); - +#if INTERNAL_WEBSERVER process_start(&webserver_nogui_process, NULL); +#endif SENSORS_ACTIVATE(button_sensor); PRINTF("RPL-Border router started\n"); @@ -219,8 +225,9 @@ PROCESS_THREAD(border_router_process, ev, data) rpl_set_prefix(dag, &prefix, 64); PRINTF("created a new RPL dag\n"); } - +#if INTERNAL_WEBSERVER print_local_addresses(); +#endif /* The border router runs with a 100% duty cycle in order to ensure high packet reception rates. */