]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
firstTry is set but not used if !defined(MSG_FASTOPEN) 11117/head
authorOtto <otto.moerbeek@open-xchange.com>
Tue, 21 Dec 2021 10:32:59 +0000 (11:32 +0100)
committerOtto <otto.moerbeek@open-xchange.com>
Tue, 21 Dec 2021 10:48:24 +0000 (11:48 +0100)
pdns/iputils.cc

index 67375ffb2ef75db98e3d365f6c77b1cbacce8ba5..ac2f737c8dbea44d8206653be94cb5de6cc9fdd5 100644 (file)
@@ -393,7 +393,9 @@ size_t sendMsgWithOptions(int fd, const char* buffer, size_t len, const ComboAdd
   msgh.msg_flags = 0;
 
   size_t sent = 0;
+#ifdef MSG_FASTOPEN
   bool firstTry = true;
+#endif
 
   do {
 
@@ -414,7 +416,9 @@ size_t sendMsgWithOptions(int fd, const char* buffer, size_t len, const ComboAdd
       }
 
       /* partial write */
+ #ifdef MSG_FASTOPEN
       firstTry = false;
+ #endif
       iov.iov_len -= written;
       iov.iov_base = reinterpret_cast<void*>(reinterpret_cast<char*>(iov.iov_base) + written);
     }