[Freeswitch-svn] [commit] r11761 - in freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv: . sofia-resolv
FreeSWITCH SVN
mikej at freeswitch.org
Wed Feb 11 07:56:44 PST 2009
Author: mikej
Date: Wed Feb 11 09:56:43 2009
New Revision: 11761
Log:
Mon Dec 15 10:50:21 CST 2008 Pekka Pessi <first.last at nokia.com>
* sofia-resolv/sres_cache.h: added prototype for sres_cache_clean()
Modified:
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sofia-resolv/sres_cache.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sres_cache.c
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sofia-resolv/sres_cache.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sofia-resolv/sres_cache.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sofia-resolv/sres_cache.h Wed Feb 11 09:56:43 2009
@@ -90,6 +90,9 @@
/** Free and zero one record. */
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 */
SRESPUBFUN
sres_record_t *sres_cache_alloc_record(sres_cache_t *cache,
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sres_cache.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sres_cache.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sres_cache.c Wed Feb 11 09:56:43 2009
@@ -437,7 +437,13 @@
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)
{
size_t i;
More information about the Freeswitch-svn
mailing list