Commit 64c78220 authored by Pekka Pessi's avatar Pekka Pessi

sofia-resolv/sres_cache.h: added prototype for sres_cache_clean()

darcs-hash:20081215165021-db55f-34ed232d011587b78ea8b61acb7c38de57fe1e0b.gz
parent 4e021620
...@@ -90,6 +90,9 @@ SRESPUBFUN void sres_cache_free_answers(sres_cache_t *, sres_record_t **); ...@@ -90,6 +90,9 @@ SRESPUBFUN void sres_cache_free_answers(sres_cache_t *, sres_record_t **);
/** Free and zero one record. */ /** Free and zero one record. */
SRESPUBFUN void sres_cache_free_one(sres_cache_t *, sres_record_t *answer); SRESPUBFUN void sres_cache_free_one(sres_cache_t *, sres_record_t *answer);
/** Remove old records from cache. */
SRESPUBFUN void sres_cache_clean(sres_cache_t *cache, time_t now);
/** Allocate a cache record */ /** Allocate a cache record */
SRESPUBFUN SRESPUBFUN
sres_record_t *sres_cache_alloc_record(sres_cache_t *cache, sres_record_t *sres_cache_alloc_record(sres_cache_t *cache,
......
...@@ -437,7 +437,13 @@ sres_hash_key(const char *string) ...@@ -437,7 +437,13 @@ sres_hash_key(const char *string)
return result; return result;
} }
/** Remove entries from cache. */ /** Remove old records from cache.
*
* Remove entries older than @a now from the cache.
*
* @param cache pointer to DNS cache object
* @param now remove older than this time
*/
void sres_cache_clean(sres_cache_t *cache, time_t now) void sres_cache_clean(sres_cache_t *cache, time_t now)
{ {
size_t i; size_t i;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment