diff options
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); } |