*
*/
-#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"
return;
}
/* buffer it */
- xmemcpy(ll->buf + ll->offset, buf, len);
+ memcpy(ll->buf + ll->offset, buf, len);
ll->offset += len;
static void
logfile_mod_tcp_lineend(Logfile * lf)
{
+ logfile_mod_tcp_flush(lf);
}
static void
int
logfile_mod_tcp_open(Logfile * lf, const char *path, size_t bufsz, int fatal_flag)
{
- debugs(5, 3, "Tcp Open called");
- IpAddress addr;
-
+ debugs(5, 3, "Tcp Open called");
+ Ip::Address addr;
+
char *strAddr;
lf->f_close = logfile_mod_tcp_close;
}
}
-safe_free(strAddr);
+ safe_free(strAddr);
- IpAddress any_addr;
+ 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())
- no_addr.SetIPv4();
-#endif
+ any_addr.SetIPv4();
ll->fd = comm_open(SOCK_STREAM, IPPROTO_TCP, any_addr, COMM_NONBLOCKING, "TCP log socket");
if (ll->fd < 0) {