- if (e->state == AVAHI_CACHE_FINAL) {
- remove_entry(e->cache, e);
- g_message("Removing entry from cache due to expiration");
- } else {
- guint percent = 0;
-
- switch (e->state) {
- case AVAHI_CACHE_VALID:
- e->state = AVAHI_CACHE_EXPIRY1;
- percent = 85;
- break;
-
- case AVAHI_CACHE_EXPIRY1:
- e->state = AVAHI_CACHE_EXPIRY2;
- percent = 90;
- break;
- case AVAHI_CACHE_EXPIRY2:
- e->state = AVAHI_CACHE_EXPIRY3;
- percent = 95;
- break;
-
- case AVAHI_CACHE_EXPIRY3:
- e->state = AVAHI_CACHE_FINAL;
- percent = 100;
- break;