mirror of
https://github.com/fergalmoran/DnsServer.git
synced 2026-02-27 02:04:00 +00:00
WebServiceZonesApi: implemented default record ttl option.
This commit is contained in:
@@ -37,6 +37,8 @@ namespace DnsServerCore
|
||||
|
||||
readonly DnsWebService _dnsWebService;
|
||||
|
||||
uint _defaultRecordTtl = 3600;
|
||||
|
||||
#endregion
|
||||
|
||||
#region constructor
|
||||
@@ -509,7 +511,7 @@ namespace DnsServerCore
|
||||
uint ttl;
|
||||
string strTtl = request.QueryString["ttl"];
|
||||
if (string.IsNullOrEmpty(strTtl))
|
||||
ttl = 3600;
|
||||
ttl = _defaultRecordTtl;
|
||||
else
|
||||
ttl = uint.Parse(strTtl);
|
||||
|
||||
@@ -1456,7 +1458,7 @@ namespace DnsServerCore
|
||||
uint ttl;
|
||||
string strTtl = request.QueryString["ttl"];
|
||||
if (string.IsNullOrEmpty(strTtl))
|
||||
ttl = 3600;
|
||||
ttl = _defaultRecordTtl;
|
||||
else
|
||||
ttl = uint.Parse(strTtl);
|
||||
|
||||
@@ -1848,5 +1850,15 @@ namespace DnsServerCore
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region properties
|
||||
|
||||
public uint DefaultRecordTtl
|
||||
{
|
||||
get { return _defaultRecordTtl; }
|
||||
set { _defaultRecordTtl = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user