]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Remove TCPIOHandler::hasBufferedData() since we cannot rely on it
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 17 Jul 2023 14:59:48 +0000 (16:59 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 7 Sep 2023 08:56:14 +0000 (10:56 +0200)
pdns/dnsdistdist/test-dnsdistnghttp2-in_cc.cc
pdns/dnsdistdist/test-dnsdistnghttp2_cc.cc
pdns/dnsdistdist/test-dnsdisttcp_cc.cc
pdns/tcpiohandler.cc
pdns/tcpiohandler.hh

index 48d2f6eeeb36d865d890e5dd33d2e644990f71c0..e3e9dedd9edaa1331d7cc2d4861c696ba3e46240 100644 (file)
@@ -362,11 +362,6 @@ public:
     BOOST_REQUIRE_EQUAL(step.request, ExpectedStep::ExpectedRequest::closeClient);
   }
 
-  bool hasBufferedData() const override
-  {
-    return false;
-  }
-
   bool isUsable() const override
   {
     return true;
index 3e5bb1631221ad4c1582c4ca17bcf3ac54fb9439..a7afea2063e11c698cf2c470c342342569edf483 100644 (file)
@@ -405,11 +405,6 @@ public:
     BOOST_REQUIRE_EQUAL(step.request, !d_client ? ExpectedStep::ExpectedRequest::closeClient : ExpectedStep::ExpectedRequest::closeBackend);
   }
 
-  bool hasBufferedData() const override
-  {
-    return false;
-  }
-
   bool isUsable() const override
   {
     return true;
index dedfd97d2b330cc2f19e6f144f32a54a42e0e54d..296cd44cb62e55f4e4afb7c5be4cd5a4aba2fda7 100644 (file)
@@ -208,11 +208,6 @@ public:
     BOOST_REQUIRE_EQUAL(step.request, !d_client ? ExpectedStep::ExpectedRequest::closeClient : ExpectedStep::ExpectedRequest::closeBackend);
   }
 
-  bool hasBufferedData() const override
-  {
-    return false;
-  }
-
   bool isUsable() const override
   {
     return true;
index 6be1eea47680ec6c1bea34b4190296e8eee3bc15..db12a7f4b959970af3ff84cf55ab71b04fae1ecb 100644 (file)
@@ -432,16 +432,6 @@ public:
     return got;
   }
 
-  bool hasBufferedData() const override
-  {
-    if (d_conn) {
-      /* this is broken when read-ahead is set, unfortunately */
-      return SSL_pending(d_conn.get()) > 0;
-    }
-
-    return false;
-  }
-
   bool isUsable() const override
   {
     if (!d_conn) {
@@ -1445,15 +1435,6 @@ public:
     return got;
   }
 
-  bool hasBufferedData() const override
-  {
-    if (d_conn) {
-      return gnutls_record_check_pending(d_conn.get()) > 0;
-    }
-
-    return false;
-  }
-
   bool isUsable() const override
   {
     if (!d_conn) {
index 3cf674ca16562fa5a3aa48d41ba0ce9210f3af01..3f68828163de3097c88f5c3c1c3407985f5d67c4 100644 (file)
@@ -32,7 +32,6 @@ public:
   virtual size_t write(const void* buffer, size_t bufferSize, const struct timeval& writeTimeout) = 0;
   virtual IOState tryWrite(const PacketBuffer& buffer, size_t& pos, size_t toWrite) = 0;
   virtual IOState tryRead(PacketBuffer& buffer, size_t& pos, size_t toRead, bool allowIncomplete=false) = 0;
-  virtual bool hasBufferedData() const = 0;
   virtual std::string getServerNameIndication() const = 0;
   virtual std::vector<uint8_t> getNextProtocol() const = 0;
   virtual LibsslTLSVersion getTLSVersion() const = 0;
@@ -476,14 +475,6 @@ public:
     return writen2WithTimeout(d_socket, buffer, bufferSize, writeTimeout);
   }
 
-  bool hasBufferedData() const
-  {
-    if (d_conn) {
-      return d_conn->hasBufferedData();
-    }
-    return false;
-  }
-
   std::string getServerNameIndication() const
   {
     if (d_conn) {