Module: sip-router
Branch: master
Commit: 89c6d73dd51eb9b96f50d3f04219612fa7725224
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=89c6d73…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Tue Dec 3 23:38:41 2013 +0100
core: don't increment failed dns query counter for reverse dns lookup at startup
- it can happen before counters are intialized, thus check that before
- reported by Hugh Waite, FS#375
---
dns_cache.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dns_cache.c b/dns_cache.c
index f3bdda9..41c93d8 100644
--- a/dns_cache.c
+++ b/dns_cache.c
@@ -2599,7 +2599,8 @@ struct hostent* dns_resolvehost(char* name)
ret = _resolvehost(name);
if(unlikely(!ret)){
/* increment dns error counter */
- counter_inc(dns_cnts_h.failed_dns_req);
+ if(counters_initialized())
+ counter_inc(dns_cnts_h.failed_dns_req);
}
return ret;
}