diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2021-09-20 13:01:39 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2021-09-20 13:01:39 +0200 |
commit | a21c91dc23ca0267f4547bc07c872d9ac4937cb4 (patch) | |
tree | 6b108d08f415f2ffe3635318cd4b07496f6b2e48 /src/server.c | |
parent | f7101248f706d48b2deaefd337c45a245589ea7d (diff) | |
download | dns-a21c91dc23ca0267f4547bc07c872d9ac4937cb4.tar.gz |
restructuring
Diffstat (limited to 'src/server.c')
-rw-r--r-- | src/server.c | 9 |
1 files changed, 7 insertions, 2 deletions
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); } |