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 fa32465f953bb18a3577ef48282f70bc18050a12..6bf0d26ed60a95db262c2b2a43c7b1ce668b7c20 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;
                }