make max_cache_entries a parameter

This commit is contained in:
Christian Mehlis 2013-11-27 17:02:06 +01:00
parent b675629a42
commit 229a131924
2 changed files with 5 additions and 4 deletions

View File

@ -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);

View File

@ -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