#include "squid.h"
#include "base/CodeContext.h"
#include "base/InstanceId.h"
+#include "base/IoManip.h"
#include "base/Random.h"
#include "base/RunnersRegistry.h"
#include "comm.h"
} while ( (x<0 && y<0) && q->nsends % nsCount != 0);
if (y > 0) {
- fd_bytes(DnsSocketB, y, FD_WRITE);
+ fd_bytes(DnsSocketB, y, IoDirection::Write);
}
if (x > 0) {
- fd_bytes(DnsSocketA, x, FD_WRITE);
+ fd_bytes(DnsSocketA, x, IoDirection::Write);
}
++ nameservers[nsn].nqueries;
return;
}
- debugs(78, 3, "idnsGrokReply: QID 0x" << std::hex << message->id << ", " << std::dec << n << " answers");
+ debugs(78, 3, "idnsGrokReply: QID 0x" << asHex(message->id) << ", " << n << " answers");
idns_query *q = idnsFindQuery(message->id);
break;
}
- fd_bytes(fd, len, FD_READ);
+ fd_bytes(fd, len, IoDirection::Read);
assert(N);
++(*N);
}
debugs(78, 3, "idnsCheckQueue: ID " << q->xact_id <<
- " QID 0x" << std::hex << std::setfill('0') <<
- std::setw(4) << q->query_id << ": timeout" );
+ " QID 0x" << asHex(q->query_id).minDigits(4) << ": timeout");
dlinkDelete(&q->lru, &lru_list);
q->pending = 0;
idnsSendQuery(q);
} else {
debugs(78, 2, "idnsCheckQueue: ID " << q->xact_id <<
- " QID 0x" << std::hex << q->query_id <<
- " : giving up after " << std::dec << q->nsends << " tries and " <<
+ " QID 0x" << asHex(q->query_id) <<
+ ": giving up after " << q->nsends << " tries and " <<
std::setw(5)<< std::setprecision(2) << tvSubDsec(q->start_t, current_time) << " seconds");
if (q->rcode != 0)
q->sz = rfc3596BuildAAAAQuery(q->name, q->buf, sizeof(q->buf), q->query_id, &q->query, Config.dns.packet_max);
debugs(78, 3, "buf is " << q->sz << " bytes for " << q->name <<
- ", id = 0x" << std::hex << q->query_id);
+ ", id = 0x" << asHex(q->query_id));
if (!q->sz) {
delete q;
return;
}
debugs(78, 3, "idnsALookup: buf is " << q->sz << " bytes for " << q->name <<
- ", id = 0x" << std::hex << q->query_id);
+ ", id = 0x" << asHex(q->query_id));
idnsCheckMDNS(q);
idnsStartQuery(q, callback, data);
}
debugs(78, 3, "idnsPTRLookup: buf is " << q->sz << " bytes for " << ip <<
- ", id = 0x" << std::hex << q->query_id);
+ ", id = 0x" << asHex(q->query_id));
q->permit_mdns = Config.onoff.dns_mdns;
idnsStartQuery(q, callback, data);