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);
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) {
/* Update the record */
avahi_record_unref(e->record);
e->record = avahi_record_ref(r);
-
+
} else {
/* No entry found, therefore we create a new one */
e->timestamp = now;
next_expiry(c, e, 80);
e->state = AVAHI_CACHE_VALID;
+ e->cache_flush = cache_flush;
}
}