]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
more time_t.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 10 Sep 2013 08:46:33 +0000 (08:46 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 10 Sep 2013 08:46:33 +0000 (08:46 +0000)
git-svn-id: file:///svn/unbound/trunk@2951 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
util/config_file.c
util/data/msgparse.h
util/data/msgreply.c

index 286095dacf69088259fc74cdfca35cd2a4fd10f0..7d4336e24575ccc54076693d59c23a7763757472 100644 (file)
@@ -1,3 +1,6 @@
+10 Sep 2013: Wouter
+       - MIN_TTL and MAX_TTL also in time_t.
+
 26 Aug 2013: Wouter
        - More fixes for bug#519: for the threaded case test if the bg
          thread has been killed, on ub_ctx_delete, to avoid hangs.
index 62510516bbad781d711e2c8a8416e15ac38b0d7c..1e0bd72df833b38f736daf4252c9205d02f554df 100644 (file)
@@ -366,9 +366,9 @@ int config_set_option(struct config_file* cfg, const char* opt,
        else S_YNO("prefetch:", prefetch)
        else S_YNO("prefetch-key:", prefetch_key)
        else if(strcmp(opt, "cache-max-ttl:") == 0)
-       { IS_NUMBER_OR_ZERO; cfg->max_ttl = atoi(val); MAX_TTL=(uint32_t)cfg->max_ttl;}
+       { IS_NUMBER_OR_ZERO; cfg->max_ttl = atoi(val); MAX_TTL=(time_t)cfg->max_ttl;}
        else if(strcmp(opt, "cache-min-ttl:") == 0)
-       { IS_NUMBER_OR_ZERO; cfg->min_ttl = atoi(val); MIN_TTL=(uint32_t)cfg->min_ttl;}
+       { IS_NUMBER_OR_ZERO; cfg->min_ttl = atoi(val); MIN_TTL=(time_t)cfg->min_ttl;}
        else S_NUMBER_OR_ZERO("infra-host-ttl:", host_ttl)
        else S_POW2("infra-cache-slabs:", infra_cache_slabs)
        else S_SIZET_NONZERO("infra-cache-numhosts:", infra_cache_numhosts)
@@ -1171,8 +1171,8 @@ cfg_parse_memsize(const char* str, size_t* res)
 void 
 config_apply(struct config_file* config)
 {
-       MAX_TTL = (uint32_t)config->max_ttl;
-       MIN_TTL = (uint32_t)config->min_ttl;
+       MAX_TTL = (time_t)config->max_ttl;
+       MIN_TTL = (time_t)config->min_ttl;
        EDNS_ADVERTISED_SIZE = (uint16_t)config->edns_buffer_size;
        MINIMAL_RESPONSES = config->minimal_responses;
        RRSET_ROUNDROBIN = config->rrset_roundrobin;
index 830d68e16cd677fed94f4adfecab73f3c9a99ae4..83d2aaaa6ea7710c5c5243c567dfefe0a1ec9ced 100644 (file)
@@ -71,9 +71,9 @@ struct regional;
 /** number of buckets in parse rrset hash table. Must be power of 2. */
 #define PARSE_TABLE_SIZE 32
 /** Maximum TTL that is allowed. */
-extern uint32_t MAX_TTL;
+extern time_t MAX_TTL;
 /** Minimum TTL that is allowed. */
-extern uint32_t MIN_TTL;
+extern time_t MIN_TTL;
 /** Negative cache time (for entries without any RRs.) */
 #define NORR_TTL 5 /* seconds */
 
index f611c2b73fa404d40b6d98cc5f8c215c2cb923ab..004d6c928f5745a23c3dc431c16e45c297844483 100644 (file)
@@ -53,9 +53,9 @@
 #include "util/data/msgencode.h"
 
 /** MAX TTL default for messages and rrsets */
-uint32_t MAX_TTL = 3600 * 24 * 10; /* ten days */
+time_t MAX_TTL = 3600 * 24 * 10; /* ten days */
 /** MIN TTL default for messages and rrsets */
-uint32_t MIN_TTL = 0;
+time_t MIN_TTL = 0;
 
 /** allocate qinfo, return 0 on error */
 static int