From f87fc5e2a91c92801fcc38cbaaa8814cd219a59d Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Mon, 4 Apr 2022 16:53:37 +0200 Subject: [PATCH] Tweaks --- pdns/recursordist/taskqueue.hh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pdns/recursordist/taskqueue.hh b/pdns/recursordist/taskqueue.hh index 5c55f4ae0e..99f82ca7c8 100644 --- a/pdns/recursordist/taskqueue.hh +++ b/pdns/recursordist/taskqueue.hh @@ -50,10 +50,14 @@ struct ResolveTask { DNSName d_qname; uint16_t d_qtype; + // Deadline is not part of index and < time_t d_deadline; - bool d_refreshMode; // Whether to run this task in regular mode (false) or in the mode that refreshes almost expired tasks + // Whether to run this task in regular mode (false) or in the mode that refreshes almost expired tasks + bool d_refreshMode; // Use a function pointer as comparing std::functions is a nuisance - void (*d_func)(const struct timeval& now, bool logErrors, const ResolveTask& task); + using TaskFunction = void (*)(const struct timeval& now, bool logErrors, const ResolveTask& task); + TaskFunction d_func; + // IP used by DoT probe tasks ComboAddress d_ip; bool operator<(const ResolveTask& a) const @@ -117,7 +121,7 @@ private: member, member, member, - member, + member, member>>, sequenced>>> queue_t; -- 2.47.3