From: Matthijs Mekking Date: Mon, 17 Jan 2011 13:59:07 +0000 (+0000) Subject: nicely outlined X-Git-Tag: release-1.4.8rc1~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=797ef20155410816e4c60f1d062762a33e56b7d5;p=thirdparty%2Funbound.git nicely outlined git-svn-id: file:///svn/unbound/trunk@2378 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/services/cache/rrset.c b/services/cache/rrset.c index 0838dfdb2..33660f89f 100644 --- a/services/cache/rrset.c +++ b/services/cache/rrset.c @@ -145,8 +145,8 @@ need_to_update_rrset(void* nd, void* cd, uint32_t timenow, int equal, int ns) /* o item in cache has expired */ if( cached->ttl < timenow ) return 1; - /* o same trust, but different in data - insert it */ - if( newd->trust == cached->trust && !equal ) { + /* o same trust, but different in data - insert it */ + if( newd->trust == cached->trust && !equal ) { /* if this is type NS, do not 'stick' to owner that changes * the NS RRset, but use the old TTL for the new data, and * update to fetch the latest data. ttl is not expired, because @@ -158,9 +158,9 @@ need_to_update_rrset(void* nd, void* cd, uint32_t timenow, int equal, int ns) if(newd->rr_ttl[i] > newd->ttl) newd->rr_ttl[i] = newd->ttl; } - return 1; + return 1; } - return 0; + return 0; } /** Update RRSet special key ID */ diff --git a/services/listen_dnsport.c b/services/listen_dnsport.c index 1f3ba5684..dd416a249 100644 --- a/services/listen_dnsport.c +++ b/services/listen_dnsport.c @@ -437,10 +437,12 @@ create_tcp_accept_sock(struct addrinfo *addr, int v6only, int* noproto) /* detect freebsd jail with no ipv6 permission */ if(addr->ai_family==AF_INET6 && errno==EINVAL) *noproto = 1; - else { log_err("can't bind socket: %s", strerror(errno)); - log_addr(0, "failed address", + else { + log_err("can't bind socket: %s", strerror(errno)); + log_addr(0, "failed address", (struct sockaddr_storage*)addr->ai_addr, - addr->ai_addrlen); } + addr->ai_addrlen); + } #else log_err("can't bind socket: %s", wsa_strerror(WSAGetLastError()));