From: Otto Moerbeek Date: Mon, 4 Apr 2022 14:53:37 +0000 (+0200) Subject: Tweaks X-Git-Tag: rec-4.7.0-beta1^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f87fc5e2a91c92801fcc38cbaaa8814cd219a59d;p=thirdparty%2Fpdns.git Tweaks --- 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;