static void htcpFreeSpecifier(htcpSpecifier * s);
static void htcpFreeDetail(htcpDetail * s);
-static void htcpHandle(char *buf, int sz, IPAddress &from);
+static void htcpHandleMsg(char *buf, int sz, IPAddress &from);
static void htcpHandleMon(htcpDataHeader *, char *buf, int sz, IPAddress &from);
len);
if (x < 0)
- debugs(31, 1, "htcpSend: FD " << htcpOutSocket << " sendto: " << xstrerror());
+ debugs(31, 3, "htcpSend: FD " << htcpOutSocket << " sendto: " << xstrerror());
else
statCounter.htcp.pkts_sent++;
}
buf += 2;
if (l > sz) {
- debugs(31, 1, "htcpUnpackSpecifier: failed to unpack METHOD");
+ debugs(31, 3, "htcpUnpackSpecifier: failed to unpack METHOD");
htcpFreeSpecifier(s);
return NULL;
}
sz -= 2;
if (l > sz) {
- debugs(31, 1, "htcpUnpackSpecifier: failed to unpack URI");
+ debugs(31, 3, "htcpUnpackSpecifier: failed to unpack URI");
htcpFreeSpecifier(s);
return NULL;
}
sz -= 2;
if (l > sz) {
- debugs(31, 1, "htcpUnpackSpecifier: failed to unpack VERSION");
+ debugs(31, 3, "htcpUnpackSpecifier: failed to unpack VERSION");
htcpFreeSpecifier(s);
return NULL;
}
sz -= 2;
if (l > sz) {
- debugs(31, 1, "htcpUnpackSpecifier: failed to unpack REQ-HDRS");
+ debugs(31, 3, "htcpUnpackSpecifier: failed to unpack REQ-HDRS");
htcpFreeSpecifier(s);
return NULL;
}
buf += 2;
if (l > sz) {
- debugs(31, 1, "htcpUnpackDetail: failed to unpack RESP_HDRS");
+ debugs(31, 3, "htcpUnpackDetail: failed to unpack RESP_HDRS");
htcpFreeDetail(d);
return NULL;
}
sz -= 2;
if (l > sz) {
- debugs(31, 1, "htcpUnpackDetail: failed to unpack ENTITY_HDRS");
+ debugs(31, 3, "htcpUnpackDetail: failed to unpack ENTITY_HDRS");
htcpFreeDetail(d);
return NULL;
}
sz -= 2;
if (l > sz) {
- debugs(31, 1, "htcpUnpackDetail: failed to unpack CACHE_HDRS");
+ debugs(31, 3, "htcpUnpackDetail: failed to unpack CACHE_HDRS");
htcpFreeDetail(d);
return NULL;
}
if (!pktlen)
{
- debugs(31, 1, "htcpTstReply: htcpBuildPacket() failed");
+ debugs(31, 3, "htcpTstReply: htcpBuildPacket() failed");
return;
}
if (pktlen == 0)
{
- debugs(31, 1, "htcpClrReply: htcpBuildPacket() failed");
+ debugs(31, 3, "htcpClrReply: htcpBuildPacket() failed");
return;
}
if (!key)
{
- debugs(31, 1, "htcpHandleTstResponse: No query key for response id '" << hdr->msg_id << "' from '" << from << "'");
+ debugs(31, 3, "htcpHandleTstResponse: No query key for response id '" << hdr->msg_id << "' from '" << from << "'");
return;
}
if ( *peer != from || peer->GetPort() != from.GetPort() )
{
- debugs(31, 1, "htcpHandleTstResponse: Unexpected response source " << from );
+ debugs(31, 3, "htcpHandleTstResponse: Unexpected response source " << from );
return;
}
d = htcpUnpackDetail(buf, sz);
if (d == NULL) {
- debugs(31, 1, "htcpHandleTstResponse: bad DETAIL");
+ debugs(31, 3, "htcpHandleTstResponse: bad DETAIL");
return;
}
* hands it off to other functions to break apart message-specific data.
*/
static void
-htcpHandle(char *buf, int sz, IPAddress &from)
+htcpHandleMsg(char *buf, int sz, IPAddress &from)
{
htcpHeader htcpHdr;
htcpDataHeader hdr;
if ((size_t)sz < sizeof(htcpHeader))
{
- debugs(31, 1, "htcpHandle: msg size less than htcpHeader size");
+ debugs(31, 3, "htcpHandle: msg size less than htcpHeader size");
return;
}
if (sz != htcpHdr.length)
{
- debugs(31, 1, "htcpHandle: sz/" << sz << " != htcpHdr.length/" <<
+ debugs(31, 3, "htcpHandle: sz/" << sz << " != htcpHdr.length/" <<
htcpHdr.length << " from " << from );
return;
if (htcpHdr.major != 0)
{
- debugs(31, 1, "htcpHandle: Unknown major version " << htcpHdr.major << " from " << from );
+ debugs(31, 3, "htcpHandle: Unknown major version " << htcpHdr.major << " from " << from );
return;
}
if ((size_t)hsz < sizeof(htcpDataHeader))
{
- debugs(31, 1, "htcpHandleData: msg size less than htcpDataHeader size");
+ debugs(31, 3, "htcpHandleData: msg size less than htcpDataHeader size");
return;
}
debugs(31, 3, "htcpHandleData: length = " << hdr.length);
if (hdr.opcode >= HTCP_END) {
- debugs(31, 1, "htcpHandleData: client " << from << ", opcode " << hdr.opcode << " out of range");
+ debugs(31, 3, "htcpHandleData: client " << from << ", opcode " << hdr.opcode << " out of range");
return;
}
debugs(31, 3, "htcpHandleData: msg_id = " << hdr.msg_id);
if (hsz < hdr.length) {
- debugs(31, 1, "htcpHandleData: sz < hdr.length");
+ debugs(31, 3, "htcpHandleData: sz < hdr.length");
return;
}
if (len)
statCounter.htcp.pkts_recv++;
- htcpHandle(buf, len, from);
+ htcpHandleMsg(buf, len, from);
commSetSelect(fd, COMM_SELECT_READ, htcpRecv, NULL, 0);
}
pktlen = htcpBuildPacket(pkt, sizeof(pkt), &stuff);
mb.clean();
if (!pktlen) {
- debugs(31, 1, "htcpQuery: htcpBuildPacket() failed");
+ debugs(31, 3, "htcpQuery: htcpBuildPacket() failed");
return;
}
xfree(stuff.S.uri);
}
if (!pktlen) {
- debugs(31, 1, "htcpClear: htcpBuildPacket() failed");
+ debugs(31, 3, "htcpClear: htcpBuildPacket() failed");
return;
}