From: havoc Date: Sun, 13 Nov 2005 12:10:08 +0000 (+0000) Subject: changed DNS name cache expiration time to 12 hours X-Git-Tag: xonotic-v0.1.0preview~4475 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=49254714ae719c2f3609e53c92a427266251a68d;p=xonotic%2Fdarkplaces.git changed DNS name cache expiration time to 12 hours git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5809 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/lhnet.c b/lhnet.c index 89438c5e..b7b0c363 100644 --- a/lhnet.c +++ b/lhnet.c @@ -156,7 +156,7 @@ int LHNETADDRESS_FromString(lhnetaddress_t *address, const char *string, int def for (i = 0;i < (int)sizeof(namecache[namecacheposition].name)-1 && name[i];i++) namecache[namecacheposition].name[i] = name[i]; namecache[namecacheposition].name[i] = 0; - namecache[namecacheposition].expirationtime = Sys_DoubleTime() + 300; + namecache[namecacheposition].expirationtime = Sys_DoubleTime() + 12 * 3600; // 12 hours namecache[namecacheposition].address = *address; namecacheposition = (namecacheposition + 1) % MAX_NAMECACHE; #ifdef STANDALONETEST @@ -174,7 +174,7 @@ int LHNETADDRESS_FromString(lhnetaddress_t *address, const char *string, int def for (i = 0;i < (int)sizeof(namecache[namecacheposition].name)-1 && name[i];i++) namecache[namecacheposition].name[i] = name[i]; namecache[namecacheposition].name[i] = 0; - namecache[namecacheposition].expirationtime = Sys_DoubleTime() + 300; + namecache[namecacheposition].expirationtime = Sys_DoubleTime() + 12 * 3600; // 12 hours namecache[namecacheposition].address = *address; namecacheposition = (namecacheposition + 1) % MAX_NAMECACHE; #ifdef STANDALONETEST @@ -189,7 +189,7 @@ int LHNETADDRESS_FromString(lhnetaddress_t *address, const char *string, int def for (i = 0;i < (int)sizeof(namecache[namecacheposition].name)-1 && name[i];i++) namecache[namecacheposition].name[i] = name[i]; namecache[namecacheposition].name[i] = 0; - namecache[namecacheposition].expirationtime = Sys_DoubleTime() + 300; + namecache[namecacheposition].expirationtime = Sys_DoubleTime() + 12 * 3600; // 12 hours namecache[namecacheposition].address.addresstype = LHNETADDRESSTYPE_NONE; namecacheposition = (namecacheposition + 1) % MAX_NAMECACHE; return 0;