From a21c91dc23ca0267f4547bc07c872d9ac4937cb4 Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Mon, 20 Sep 2021 13:01:39 +0200 Subject: restructuring --- src/server.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/server.c') diff --git a/src/server.c b/src/server.c index 3796b87..da6755e 100644 --- a/src/server.c +++ b/src/server.c @@ -18,8 +18,13 @@ void server_start ( server_config_t* _config ) signal ( SIGTERM, signal_term ); signal ( SIGINT, signal_term ); - if ( database_populate( &zone_db, _config->zonefile ) ) { - LOGPRINTF(_LOG_ERRNO, "Failed to populate database from zonefile"); + if ( database_init( &zone_db ) ) { + LOGPRINTF(_LOG_ERROR, "Failed create database"); + exit(1); + } + + if ( zonefile_to_database( &zone_db, _config->zonefile ) ) { + LOGPRINTF(_LOG_ERROR, "Failed populate database"); exit(1); } -- cgit v1.2.3