]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/log/ModTcp.cc
Renamed squid.h to squid-old.h and config.h to squid.h
[thirdparty/squid.git] / src / log / ModTcp.cc
index 8fef05145975344394d6af2465753c645be20cd6..49a820b257d1a0c766fd3d5a50ac5e7ac4bdcdac 100644 (file)
@@ -31,8 +31,9 @@
  *
  */
 
-#include "squid.h"
+#include "squid-old.h"
 #include "comm.h"
+#include "comm/Connection.h"
 #include "log/File.h"
 #include "log/ModTcp.h"
 #include "Parsing.h"
@@ -101,7 +102,7 @@ logfile_mod_tcp_writeline(Logfile * lf, const char *buf, size_t len)
         return;
     }
     /* buffer it */
-    xmemcpy(ll->buf + ll->offset, buf, len);
+    memcpy(ll->buf + ll->offset, buf, len);
 
     ll->offset += len;
 
@@ -118,6 +119,7 @@ logfile_mod_tcp_linestart(Logfile * lf)
 static void
 logfile_mod_tcp_lineend(Logfile * lf)
 {
+    logfile_mod_tcp_flush(lf);
 }
 
 static void
@@ -185,11 +187,9 @@ logfile_mod_tcp_open(Logfile * lf, const char *path, size_t bufsz, int fatal_fla
     Ip::Address any_addr;
     any_addr.SetAnyAddr();
 
-#if USE_IPV6
     // require the sending TCP port to be of the right family for the destination address.
     if (addr.IsIPv4())
         any_addr.SetIPv4();
-#endif
 
     ll->fd = comm_open(SOCK_STREAM, IPPROTO_TCP, any_addr, COMM_NONBLOCKING, "TCP log socket");
     if (ll->fd < 0) {