Signed-off-by: Felix Fietkau <nbd@openwrt.org>
#include "interface.h"
static struct uloop_timeout cache_gc;
#include "interface.h"
static struct uloop_timeout cache_gc;
-struct avl_tree records, entries;
+struct avl_tree entries;
+static AVL_TREE(records, avl_strcmp, true, NULL);
static void
cache_record_free(struct cache_record *r)
static void
cache_record_free(struct cache_record *r)
cache_init(void)
{
avl_init(&entries, avl_strcmp, true, NULL);
cache_init(void)
{
avl_init(&entries, avl_strcmp, true, NULL);
- avl_init(&records, avl_strcmp, true, NULL);
cache_gc.cb = cache_gc_timer;
uloop_timeout_set(&cache_gc, 10000);
cache_gc.cb = cache_gc_timer;
uloop_timeout_set(&cache_gc, 10000);
-extern struct avl_tree records, entries;
+extern struct avl_tree entries;
int cache_init(void);
void cache_scan(void);
int cache_init(void);
void cache_scan(void);