mirror of
https://github.com/fergalmoran/DnsServer.git
synced 2026-01-06 08:45:32 +00:00
DhcpServer: fixed minor bug in RenameScope(). Added SaveScope() method.
This commit is contained in:
@@ -989,7 +989,7 @@ namespace DnsServerCore.Dhcp
|
||||
|
||||
public void RenameScope(string name, string newName)
|
||||
{
|
||||
if (_scopes.TryGetValue(name, out Scope scope))
|
||||
if (!_scopes.TryGetValue(name, out Scope scope))
|
||||
throw new DhcpServerException("Scope with name '" + name + "' does not exists.");
|
||||
|
||||
if (!_scopes.TryAdd(newName, scope))
|
||||
@@ -1032,6 +1032,12 @@ namespace DnsServerCore.Dhcp
|
||||
}
|
||||
}
|
||||
|
||||
public void SaveScope(string name)
|
||||
{
|
||||
if (_scopes.TryGetValue(name, out Scope scope))
|
||||
SaveScopeFile(scope);
|
||||
}
|
||||
|
||||
public IDictionary<string, string> GetAddressClientMap()
|
||||
{
|
||||
Dictionary<string, string> map = new Dictionary<string, string>();
|
||||
|
||||
Reference in New Issue
Block a user