]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Fix issues reported by Charles-Henri during code review
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 14 Feb 2020 09:00:55 +0000 (10:00 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 14 Feb 2020 09:00:55 +0000 (10:00 +0100)
pdns/dnsdist.hh
pdns/dnsdistdist/docs/guides/serverselection.rst
pdns/dnsdistdist/docs/reference/config.rst
pdns/dnsdistdist/docs/reference/netmask.rst

index bf54a89aebb4dc43aca7ae2775e3ccf6377a5990..99f85ee0c02c10e763fc5a069dc62b705d632d16 100644 (file)
@@ -860,9 +860,7 @@ struct DownstreamState
   void setName(const std::string& newName)
   {
     name = newName;
-    if (newName.empty()) {
-      nameWithAddr = newName.empty() ? remote.toStringWithPort() : (name + " (" + remote.toStringWithPort()+ ")");
-    }
+    nameWithAddr = newName.empty() ? remote.toStringWithPort() : (name + " (" + remote.toStringWithPort()+ ")");
   }
 
   string getStatus() const
index 16f2084decdb1e05a35cb13b531beac671bc6468..47c4fa55bb6cea552bed3a18c73c2acb1b71aa83 100644 (file)
@@ -170,7 +170,7 @@ Functions
 
 .. function:: setServerPolicyLua(name, function)
 
-  Set server selection policy to one named `name`` and provided by ``function``.
+  Set server selection policy to one named ``name`` and provided by ``function``.
 
   :param string name: name for this policy
   :param string function: name of the function
@@ -179,7 +179,7 @@ Functions
 
   .. versionadded:: 1.5.0
 
-  Set server selection policy to one named `name`` and provided by the FFI function ``function``.
+  Set server selection policy to one named ``name`` and provided by the FFI function ``function``.
 
   :param string name: name for this policy
   :param string function: name of the FFI function
index ff139f48bf8fc5c89a93d626d0afa39bb4987866..cbd1de0d53d82c266c09e866e2711cbb1c99900d 100644 (file)
@@ -18,7 +18,7 @@ Within dnsdist several core object types exist:
 * :class:`Server`: generated with :func:`newServer`, represents a downstream server
 * :class:`ComboAddress`: represents an IP address and port
 * :class:`DNSName`: represents a domain name
-* :class:`Netmask`: represents a Netmask
+* :class:`Netmask`: represents a netmask
 * :class:`NetmaskGroup`: represents a group of netmasks
 * :class:`QPSLimiter`: implements a QPS-based filter
 * :class:`SuffixMatchNode`: represents a group of domain suffixes for rapid testing of membership
index 411d0a7e966bd31e8bcc39cfef5882f8add83f13..89a66307d6c03b2267b0ef959db3f4156f36c597 100644 (file)
@@ -26,7 +26,7 @@ Netmask
 
     Return a :class:`ComboAddress` object representing the base network of this netmask object after masking any additional bits if necessary (for example ``192.0.2.0`` if the netmask was constructed with ``newNetmask('192.0.2.1/24')).
 
-  .. method:: Netmask:isEmpty() -> bool
+  .. method:: Netmask:empty() -> bool
 
     Return true if the netmask is empty, meaning that the netmask has not been set to a proper value.