1 From bdbbb4be07bb33fe083baef2bd0ef38b91c11120 Mon Sep 17 00:00:00 2001
2 From: Pavel Zhukov <pzhukov@redhat.com>
3 Date: Thu, 21 Feb 2019 10:44:06 +0100
4 Subject: [PATCH 21/28] Load leases DB in non-replay mode only
7 server/confpars.c | 12 ++++++++++--
8 1 file changed, 10 insertions(+), 2 deletions(-)
10 diff --git a/server/confpars.c b/server/confpars.c
11 index 5a6396b..6e08ad7 100644
12 --- a/server/confpars.c
13 +++ b/server/confpars.c
14 @@ -134,6 +134,11 @@ isc_result_t read_conf_file (const char *filename, struct group *group,
16 cfile = (struct parse *)0;
18 + // No need to dmalloc huge memory region if we're not going to re-play
19 + if (!trace_record()){
20 + status = new_parse(&cfile, file, NULL, 0, filename, 0);
23 flen = lseek (file, (off_t)0, SEEK_END);
26 @@ -165,7 +170,6 @@ isc_result_t read_conf_file (const char *filename, struct group *group,
28 log_fatal ("%s: short read of %d bytes instead of %d.",
29 filename, ulen, result);
32 /* If we're recording, write out the filename and file contents. */
34 @@ -174,6 +178,9 @@ isc_result_t read_conf_file (const char *filename, struct group *group,
36 status = new_parse(&cfile, file, NULL, 0, filename, 0);
39 + if (!trace_playback())
41 if (status != ISC_R_SUCCESS || cfile == NULL)
44 @@ -183,7 +190,8 @@ isc_result_t read_conf_file (const char *filename, struct group *group,
45 status = conf_file_subparse (cfile, group, group_type);