diff options
author | Robert Greenwalt <rgreenwalt@google.com> | 2011-09-02 07:44:36 -0700 |
---|---|---|
committer | Robert Greenwalt <rgreenwalt@google.com> | 2011-09-02 07:44:36 -0700 |
commit | 7f84da69f86ed9daf610c8d1129392ba3f7c4405 (patch) | |
tree | dd1d2b0e5659065334bec7962b7d2a83de541824 /libc/netbsd/resolv | |
parent | 96e5faccdc5616bb6d4a55d50a0e6148f99d943b (diff) | |
download | bionic-7f84da69f86ed9daf610c8d1129392ba3f7c4405.zip bionic-7f84da69f86ed9daf610c8d1129392ba3f7c4405.tar.gz bionic-7f84da69f86ed9daf610c8d1129392ba3f7c4405.tar.bz2 |
Add some logging of dns cache operations
Added info about what entries are getting flushed due to ttl or size limits.
Change-Id: I69fb70ce23b5b820f5f1a5738c0f1aa57b6a1127
Diffstat (limited to 'libc/netbsd/resolv')
-rw-r--r-- | libc/netbsd/resolv/res_cache.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libc/netbsd/resolv/res_cache.c b/libc/netbsd/resolv/res_cache.c index e3ceb5a..e88c221 100644 --- a/libc/netbsd/resolv/res_cache.c +++ b/libc/netbsd/resolv/res_cache.c @@ -1405,6 +1405,10 @@ _cache_remove_oldest( Cache* cache ) XLOG("%s: OLDEST NOT IN HTABLE ?", __FUNCTION__); return; } + if (DEBUG) { + XLOG("Cache full - removing oldest"); + XLOG_QUERY(oldest->query, oldest->querylen); + } _cache_remove_p(cache, lookup); } @@ -1453,6 +1457,7 @@ _resolv_cache_lookup( struct resolv_cache* cache, /* remove stale entries here */ if (now >= e->expires) { XLOG( " NOT IN CACHE (STALE ENTRY %p DISCARDED)", *lookup ); + XLOG_QUERY(e->query, e->querylen); _cache_remove_p(cache, lookup); goto Exit; } |