/*
- * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
#include "squid.h"
#include "anyp/PortCfg.h"
#include "comm/Connection.h"
-#include "disk.h"
#include "event.h"
#include "fd.h"
#include "fde.h"
+#include "fs_io.h"
#include "globals.h"
#include "ICP.h"
#include "ipcache.h"
}
static void
-send_announce(const ipcache_addrs *ia, const DnsLookupDetails &, void *)
+send_announce(const ipcache_addrs *ia, const Dns::LookupDetails &, void *)
{
LOCAL_ARRAY(char, tbuf, 256);
LOCAL_ARRAY(char, sndbuf, BUFSIZ);
sndbuf[l] = '\0';
file_close(fd);
} else {
- debugs(50, DBG_IMPORTANT, "send_announce: " << file << ": " << xstrerror());
+ int xerrno = errno;
+ debugs(50, DBG_IMPORTANT, "send_announce: " << file << ": " << xstrerr(xerrno));
}
}
- Ip::Address S = ia->in_addrs[0];
+ Ip::Address S = ia->current();
S.port(port);
assert(Comm::IsConnOpen(icpOutgoingConn));
- if (comm_udp_sendto(icpOutgoingConn->fd, S, sndbuf, strlen(sndbuf) + 1) < 0)
- debugs(27, DBG_IMPORTANT, "ERROR: Failed to announce to " << S << " from " << icpOutgoingConn->local << ": " << xstrerror());
+ if (comm_udp_sendto(icpOutgoingConn->fd, S, sndbuf, strlen(sndbuf) + 1) < 0) {
+ int xerrno = errno;
+ debugs(27, DBG_IMPORTANT, "ERROR: Failed to announce to " << S << " from " << icpOutgoingConn->local << ": " << xstrerr(xerrno));
+ }
}