1 From caeea190f12efd20139f694aac4942d1ac00019f Mon Sep 17 00:00:00 2001
2 From: Simon Kelley <simon@thekelleys.org.uk>
3 Date: Sat, 14 Feb 2015 20:08:56 +0000
4 Subject: [PATCH 50/71] Make dynamic hosts files work when --no-hosts set.
7 src/cache.c | 21 +++++++++++----------
8 1 file changed, 11 insertions(+), 10 deletions(-)
10 diff --git a/src/cache.c b/src/cache.c
11 index 43245b771b53..c95624c42b1c 100644
14 @@ -1133,17 +1133,18 @@ void cache_reload(void)
16 if (daemon->cachesize > 0)
17 my_syslog(LOG_INFO, _("cleared cache"));
21 - if (!option_bool(OPT_NO_HOSTS))
22 - total_size = read_hostsfile(HOSTSFILE, SRC_HOSTS, total_size, (struct crec **)daemon->packet, revhashsz);
24 - daemon->addn_hosts = expand_filelist(daemon->addn_hosts);
25 - for (ah = daemon->addn_hosts; ah; ah = ah->next)
26 - if (!(ah->flags & AH_INACTIVE))
27 - total_size = read_hostsfile(ah->fname, ah->index, total_size, (struct crec **)daemon->packet, revhashsz);
31 + if (!option_bool(OPT_NO_HOSTS))
32 + total_size = read_hostsfile(HOSTSFILE, SRC_HOSTS, total_size, (struct crec **)daemon->packet, revhashsz);
34 + daemon->addn_hosts = expand_filelist(daemon->addn_hosts);
35 + for (ah = daemon->addn_hosts; ah; ah = ah->next)
36 + if (!(ah->flags & AH_INACTIVE))
37 + total_size = read_hostsfile(ah->fname, ah->index, total_size, (struct crec **)daemon->packet, revhashsz);
41 set_dynamic_inotify(AH_HOSTS, total_size, (struct crec **)daemon->packet, revhashsz);