2020-01-07 01:23:16 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <lmdb.h>
|
|
|
|
|
2020-02-08 12:50:54 +00:00
|
|
|
#include <logger.h>
|
2019-11-15 00:23:43 +00:00
|
|
|
#include <models/controller.h>
|
2020-02-09 23:58:17 +00:00
|
|
|
#include <database.h>
|
|
|
|
#include <config.h>
|
2019-11-15 00:23:43 +00:00
|
|
|
|
2020-02-08 14:09:34 +00:00
|
|
|
/**
|
|
|
|
* @brief The main function
|
|
|
|
*
|
|
|
|
* @param argc UNUSED
|
|
|
|
* @param argv UNUSED
|
|
|
|
*
|
|
|
|
* @return Statuscode to indicate success (0) or failure (!0)
|
|
|
|
*/
|
2019-11-15 00:23:43 +00:00
|
|
|
int
|
|
|
|
main(int argc, char** argv)
|
|
|
|
{
|
|
|
|
(void)argc;
|
|
|
|
(void)argv;
|
2020-01-07 01:23:16 +00:00
|
|
|
|
|
|
|
MDB_env *mdb_env;
|
2020-02-09 23:58:17 +00:00
|
|
|
database_setup(&mdb_env);
|
2020-01-07 01:23:16 +00:00
|
|
|
|
2020-02-08 14:09:34 +00:00
|
|
|
controller *this_cntrlr = controller_load(mdb_env);
|
2020-02-08 12:50:54 +00:00
|
|
|
controller_save(this_cntrlr, mdb_env);
|
2020-01-07 01:23:16 +00:00
|
|
|
|
|
|
|
mdb_env_close(mdb_env);
|
2019-11-15 00:23:43 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|