diff options
author | Lennart Poettering <lennart@poettering.net> | 2005-06-03 12:45:47 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2005-06-03 12:45:47 +0000 |
commit | 4ff0807c04fcc239de52a793bceb88e7f3408f3f (patch) | |
tree | d91040a9cbf354d21d1379efb341a7d52282b681 /avahi-core/cache.c | |
parent | f1b541eb614861312f917dab1bf75ad8267e321a (diff) |
* implement reflection (including legacy unicast reflection)
* implement a history in the probe scheduler
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@92 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-core/cache.c')
-rw-r--r-- | avahi-core/cache.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/avahi-core/cache.c b/avahi-core/cache.c index c5e7e31..433f5a8 100644 --- a/avahi-core/cache.c +++ b/avahi-core/cache.c @@ -230,7 +230,7 @@ static void expire_in_one_second(AvahiCache *c, AvahiCacheEntry *e) { update_time_event(c, e); } -void avahi_cache_update(AvahiCache *c, AvahiRecord *r, gboolean unique, const AvahiAddress *a) { +void avahi_cache_update(AvahiCache *c, AvahiRecord *r, gboolean cache_flush, const AvahiAddress *a) { /* gchar *txt; */ g_assert(c); @@ -257,7 +257,7 @@ void avahi_cache_update(AvahiCache *c, AvahiRecord *r, gboolean unique, const Av if ((first = avahi_cache_lookup_key(c, r->key))) { - if (unique) { + if (cache_flush) { /* For unique entries drop all entries older than one second */ for (e = first; e; e = e->by_key_next) { @@ -288,7 +288,7 @@ void avahi_cache_update(AvahiCache *c, AvahiRecord *r, gboolean unique, const Av /* Update the record */ avahi_record_unref(e->record); e->record = avahi_record_ref(r); - + } else { /* No entry found, therefore we create a new one */ @@ -314,6 +314,7 @@ void avahi_cache_update(AvahiCache *c, AvahiRecord *r, gboolean unique, const Av e->timestamp = now; next_expiry(c, e, 80); e->state = AVAHI_CACHE_VALID; + e->cache_flush = cache_flush; } } |