g_log << u << buf.str() << endl;
}
-
static int ratePercentage(uint64_t nom, uint64_t denom)
{
if (denom == 0) {
unsigned int n = 0;
for (const auto& threadInfo : RecThreadInfo::infos()) {
- if (n++ == RecThreadInfo::id()) {
+ if (n++ == RecThreadInfo::id()) {
func(); // don't write to ourselves!
continue;
}
if (RecThreadInfo::weDistributeQueries()) {
/* first thread is the handler, then distributors */
for (unsigned int threadId = 1; threadId <= RecThreadInfo::numDistributors(); threadId++) {
- auto& info = RecThreadInfo::info(threadId);
+ auto& info = RecThreadInfo::info(threadId);
auto& deferredAdds = info.deferredAdds;
auto& tcpSockets = info.tcpSockets;
makeUDPServerSockets(deferredAdds);
else {
/* first thread is the handler, there is no distributor here and workers are accepting queries */
for (unsigned int threadId = 1; threadId <= RecThreadInfo::numWorkers(); threadId++) {
- auto& info = RecThreadInfo::info(threadId);
+ auto& info = RecThreadInfo::info(threadId);
auto& deferredAdds = info.deferredAdds;
auto& tcpSockets = info.tcpSockets;
makeUDPServerSockets(deferredAdds);
bool wantAnswer;
};
-
-
PacketBuffer GenUDPQueryResponse(const ComboAddress& dest, const string& query);
bool checkProtobufExport(LocalStateHolder<LuaConfigItems>& luaconfsLocal);
bool checkOutgoingProtobufExport(LocalStateHolder<LuaConfigItems>& luaconfsLocal);