diff options
author | Michael McVady <femtonaut@gmail.com> | 2022-05-25 17:22:55 -0500 |
---|---|---|
committer | Michael McVady <femtonaut@gmail.com> | 2022-05-25 17:22:55 -0500 |
commit | 997b0d9a9c6282b8f3e622291ab4fe63851f6142 (patch) | |
tree | b3ea4c30a4dc4f8321395ad5ecbe003355d5eb45 | |
parent | 197c6663712ce20d693c693d54cafdbded8c2f3e (diff) |
Don't start if failed to register database
-rw-r--r-- | src/init.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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 |