/*
- * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
icmp_sock = socket(PF_INET, SOCK_RAW, IPPROTO_ICMP);
if (icmp_sock < 0) {
- debugs(50, DBG_CRITICAL, HERE << " icmp_sock: " << xstrerror());
+ int xerrno = errno;
+ debugs(50, DBG_CRITICAL, MYNAME << " icmp_sock: " << xstrerr(xerrno));
return -1;
}
S->ai_addrlen);
if (x < 0) {
- debugs(42, DBG_IMPORTANT, HERE << "Error sending to ICMP packet to " << to << ". ERR: " << xstrerror());
+ int xerrno = errno;
+ debugs(42, DBG_IMPORTANT, MYNAME << "ERROR: sending to ICMP packet to " << to << ": " << xstrerr(xerrno));
}
Log(to, ' ', NULL, 0, 0);