From f143227205fe4d85b5b0a530622c77f1ce5ddd84 Mon Sep 17 00:00:00 2001 From: nvt-se Date: Tue, 29 Sep 2009 16:02:28 +0000 Subject: [PATCH] made the route discovery packet timeout configurable. --- core/net/routing/rimeroute.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/core/net/routing/rimeroute.c b/core/net/routing/rimeroute.c index 2aba7da11..f69f68d44 100644 --- a/core/net/routing/rimeroute.c +++ b/core/net/routing/rimeroute.c @@ -32,7 +32,7 @@ * * This file is part of the Contiki operating system. * - * $Id: rimeroute.c,v 1.1 2009/04/06 13:11:25 nvt-se Exp $ + * $Id: rimeroute.c,v 1.2 2009/09/29 16:02:28 nvt-se Exp $ */ /** * \file @@ -72,8 +72,13 @@ void uip_log(char *msg); #define UIP_LOG(m) #endif /* UIP_LOGGING == 1 */ -#define ROUTE_DISCOVERY_CHANNELS 70 -#define PACKET_TIMEOUT (CLOCK_SECOND * 10) +#define ROUTE_DISCOVERY_CHANNEL 70 + +#ifndef RIMEROUTE_CONF_DISCOVERY_TIMEOUT +#define PACKET_TIMEOUT (CLOCK_SECOND * 10) +#else +#define PACKET_TIMEOUT (CLOCK_SECOND * RIMEROUTE_CONF_DISCOVERY_TIMEOUT) +#endif /* RIMEROUTE_CONF_DISCOVERY_TIMEOUT */ static void found_route(struct route_discovery_conn *, rimeaddr_t *); static void route_timed_out(struct route_discovery_conn *); @@ -102,7 +107,7 @@ PROCESS_THREAD(rimeroute_process, ev, data) route_discovery_open(&route_discovery_conn, CLOCK_SECOND * 10, - ROUTE_DISCOVERY_CHANNELS, + ROUTE_DISCOVERY_CHANNEL, &route_discovery_callbacks); while(1) {