summaryrefslogtreecommitdiffstats
path: root/avahi-core/cache.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-06-25 23:12:26 +0200
committerLennart Poettering <lennart@poettering.net>2010-06-25 23:12:26 +0200
commit037ca37a213d9e40258f5ebc3b00113df9f842d1 (patch)
tree4afc37ea2f5c75ccfd9b6377fe013956cb385531 /avahi-core/cache.c
parent2f56f8a0943f92d430c8f395880ace8f5922f85b (diff)
daemon: make internal limits configurable
Diffstat (limited to 'avahi-core/cache.c')
-rw-r--r--avahi-core/cache.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/avahi-core/cache.c b/avahi-core/cache.c
index c074579..454aac5 100644
--- a/avahi-core/cache.c
+++ b/avahi-core/cache.c
@@ -32,8 +32,6 @@
#include "log.h"
#include "rr-util.h"
-#define AVAHI_CACHE_ENTRIES_MAX 500
-
static void remove_entry(AvahiCache *c, AvahiCacheEntry *e) {
AvahiCacheEntry *t;
@@ -340,7 +338,7 @@ void avahi_cache_update(AvahiCache *c, AvahiRecord *r, int cache_flush, const Av
/* avahi_log_debug("cache: couldn't find matching cache entry for %s", txt); */
- if (c->n_entries >= AVAHI_CACHE_ENTRIES_MAX)
+ if (c->n_entries >= c->server->config.n_cache_entries_max)
return;
if (!(e = avahi_new(AvahiCacheEntry, 1))) {
@@ -513,6 +511,3 @@ void avahi_cache_stop_poof(AvahiCache *c, AvahiRecord *record, const AvahiAddres
next_expiry(c, e, 80);
}
}
-
-
-