[sr-dev] git:master: dns_cache: dns.view RPC command fix

Miklos Tirpak miklos at iptel.org
Wed Jun 23 17:32:14 CEST 2010


Module: sip-router
Branch: master
Commit: 249312d7beff3ea6c3cf2fb0441262e770316eb1
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=249312d7beff3ea6c3cf2fb0441262e770316eb1

Author: Miklos Tirpak <miklos at iptel.org>
Committer: Miklos Tirpak <miklos at iptel.org>
Date:   Thu Jun 17 11:01:31 2010 +0200

dns_cache: dns.view RPC command fix

Do not print out the expiration time of the resource
records in a permanent cache entry, they never expire.

---

 dns_cache.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dns_cache.c b/dns_cache.c
index 3c98779..2ec3d3e 100644
--- a/dns_cache.c
+++ b/dns_cache.c
@@ -3868,7 +3868,8 @@ void dns_cache_print_entry(rpc_t* rpc, void* ctx, struct dns_hash_entry* e)
 				rpc->printf(ctx, "%sresource record: unknown",
 									SPACE_FORMAT);
 		}
-		rpc->printf(ctx, "%srr expires in (s): %d", SPACE_FORMAT,
+		if ((e->ent_flags & DNS_FLAG_PERMANENT) == 0)
+			rpc->printf(ctx, "%srr expires in (s): %d", SPACE_FORMAT,
 						(s_ticks_t)(rr->expire-now)<0?-1 : 
 						TICKS_TO_S(rr->expire-now));
 	}




More information about the sr-dev mailing list