aboutsummaryrefslogtreecommitdiff
path: root/src/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/init.c')
-rw-r--r--src/init.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/init.c b/src/init.c
index 8a32cd0..0dbeada 100644
--- a/src/init.c
+++ b/src/init.c
@@ -6,12 +6,19 @@ void kore_parent_configure(int, char **);
static const char *database = "db";
-/* Let kore handle the default option parsing. */
void
kore_parent_configure(int argc, char **argv)
{
- init_db();
+ int err = 0;
+
kore_default_getopt(argc, argv);
+
+ err = init_db();
+ if (err != KORE_RESULT_OK) {
+ kore_log(LOG_ERR, "Error registering the database.");
+ // FIXME How to terminate?
+ exit(1);
+ }
}
int