From 229a131924b17fbd693db2b672cc02b6c22d72ef Mon Sep 17 00:00:00 2001 From: Christian Mehlis Date: Wed, 27 Nov 2013 17:02:06 +0100 Subject: [PATCH] make max_cache_entries a parameter --- sys/net/ccn_lite/ccn-lite-relay.c | 5 ++--- sys/net/ccn_lite/include/ccnl-riot.h | 4 +++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/net/ccn_lite/ccn-lite-relay.c b/sys/net/ccn_lite/ccn-lite-relay.c index 01ae24cdf0..9eae66c400 100644 --- a/sys/net/ccn_lite/ccn-lite-relay.c +++ b/sys/net/ccn_lite/ccn-lite-relay.c @@ -368,15 +368,14 @@ int ccnl_io_loop(struct ccnl_relay_s *ccnl) * @param pointer to count transceiver pids * */ -void ccnl_riot_relay_start(void) +void ccnl_riot_relay_start(int max_cache_entries) { - int max_cache_entries = 20; - struct timeval now; theRelay.startup_time = rtc_time(&now); DEBUGMSG(1, "This is ccn-lite-relay, starting at %lu:%lu\n", now.tv_sec, now.tv_usec); DEBUGMSG(1, " compile time: %s %s\n", __DATE__, __TIME__); + DEBUGMSG(1, " max_cache_entries: %d\n", max_cache_entries); DEBUGMSG(1, " compile options: %s\n", compile_string()); ccnl_relay_config(&theRelay, max_cache_entries); diff --git a/sys/net/ccn_lite/include/ccnl-riot.h b/sys/net/ccn_lite/include/ccnl-riot.h index c5c70086db..2c9c0a5ce0 100644 --- a/sys/net/ccn_lite/include/ccnl-riot.h +++ b/sys/net/ccn_lite/include/ccnl-riot.h @@ -74,8 +74,10 @@ typedef enum ccnl_riot_event { * @brief starts the ccnl relay * * @note to stop the relay send msg "RIOT_HALT" to this thread + * + * @param max_cache_entries number of slots in the CS */ -void ccnl_riot_relay_start(void); +void ccnl_riot_relay_start(int max_cache_entries); /** * @brief starts an appication server, which can repy to ccn interests