X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-core%2Fcache.c;h=dddd5eea8b1eae0f9036bcb8e2cd35c5767e8a82;hb=5ebf655c85076f200955458673a8bbf0dd927407;hp=174fceb108c2c9b065302843a5a9589eb5815641;hpb=66142b071a2497d7e3cf58d7bf5159bb1c970d84;p=catta diff --git a/avahi-core/cache.c b/avahi-core/cache.c index 174fceb..dddd5ee 100644 --- a/avahi-core/cache.c +++ b/avahi-core/cache.c @@ -25,7 +25,7 @@ #include -#include "util.h" +#include "timeval.h" #include "cache.h" #include "log.h" @@ -241,7 +241,7 @@ static void expire_in_one_second(AvahiCache *c, AvahiCacheEntry *e) { g_assert(e); e->state = AVAHI_CACHE_FINAL; - g_get_current_time(&e->expiry); + gettimeofday(&e->expiry, NULL); avahi_timeval_add(&e->expiry, 1000000); /* 1s */ update_time_event(c, e); } @@ -264,9 +264,9 @@ void avahi_cache_update(AvahiCache *c, AvahiRecord *r, gboolean cache_flush, con } else { AvahiCacheEntry *e = NULL, *first; - GTimeVal now; + struct timeval now; - g_get_current_time(&now); + gettimeofday(&now, NULL); /* This is an update request */ @@ -378,13 +378,13 @@ void avahi_cache_dump(AvahiCache *c, AvahiDumpCallback callback, gpointer userda } gboolean avahi_cache_entry_half_ttl(AvahiCache *c, AvahiCacheEntry *e) { - GTimeVal now; + struct timeval now; AvahiUsec age; g_assert(c); g_assert(e); - g_get_current_time(&now); + gettimeofday(&now, NULL); age = avahi_timeval_diff(&now, &e->timestamp)/1000000;