]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: tidy variable name 13664/head
authorCharles-Henri Bruyand <charles-henri.bruyand@open-xchange.com>
Tue, 26 Dec 2023 13:20:38 +0000 (14:20 +0100)
committerCharles-Henri Bruyand <charles-henri.bruyand@open-xchange.com>
Tue, 26 Dec 2023 13:20:38 +0000 (14:20 +0100)
pdns/iputils.cc
pdns/iputils.hh

index e52755670b15637dd392dc4adea14e12bf37895f..2f629cbfa19d4f49cf63399de03bb984771e0f5f 100644 (file)
@@ -538,33 +538,33 @@ void setSocketSendBuffer(int fd, uint32_t size)
   setSocketBuffer(fd, SO_SNDBUF, size);
 }
 
-static uint32_t raiseSocketBufferToMax(int fd, int optname, const std::string& readMaxFromFile)
+static uint32_t raiseSocketBufferToMax(int socket, int optname, const std::string& readMaxFromFile)
 {
   std::ifstream ifs(readMaxFromFile);
   if (ifs) {
     std::string line;
     if (getline(ifs, line)) {
       auto max = pdns::checked_stoi<uint32_t>(line);
-      setSocketBuffer(fd, optname, max);
+      setSocketBuffer(socket, optname, max);
       return max;
     }
   }
   return 0;
 }
 
-uint32_t raiseSocketReceiveBufferToMax(int fd)
+uint32_t raiseSocketReceiveBufferToMax(int socket)
 {
 #ifdef __linux__
-  return raiseSocketBufferToMax(fd, SO_RCVBUF, "/proc/sys/net/core/rmem_max");
+  return raiseSocketBufferToMax(socket, SO_RCVBUF, "/proc/sys/net/core/rmem_max");
 #else
   return 0;
 #endif
 }
 
-uint32_t raiseSocketSendBufferToMax(int fd)
+uint32_t raiseSocketSendBufferToMax(int socket)
 {
 #ifdef __linux__
-  return raiseSocketBufferToMax(fd, SO_SNDBUF, "/proc/sys/net/core/wmem_max");
+  return raiseSocketBufferToMax(socket, SO_SNDBUF, "/proc/sys/net/core/wmem_max");
 #else
   return 0;
 #endif
index 7f0159e55206280ec297c898e189b3904afc6f89..2a5b21544eaab64eabaead765e1d96241b53587e 100644 (file)
@@ -1729,5 +1729,5 @@ std::vector<Netmask> getListOfRangesOfNetworkInterface(const std::string& itf);
 void setSocketBuffer(int fd, int optname, uint32_t size);
 void setSocketReceiveBuffer(int fd, uint32_t size);
 void setSocketSendBuffer(int fd, uint32_t size);
-uint32_t raiseSocketReceiveBufferToMax(int fd);
-uint32_t raiseSocketSendBufferToMax(int fd);
+uint32_t raiseSocketReceiveBufferToMax(int socket);
+uint32_t raiseSocketSendBufferToMax(int socket);