Set TTL to the new value when updating cached service entry
[project/mdnsd.git] / cache.c
diff --git a/cache.c b/cache.c
index fa32465..6bf0d26 100644 (file)
--- a/cache.c
+++ b/cache.c
@@ -143,6 +143,7 @@ cache_service(struct interface *iface, char *entry, int hlen, int ttl)
                if (!strcmp(s->entry, entry)) {
                        s->refresh = 50;
                        s->time = monotonic_time();
+                       s->ttl = ttl;
                        return s;
                }