1: #include "global.h"
2: #include "rtlm.h"
3:
4:
5: sl_config cfg;
6:
7:
8: int
9: main(int argc, char **argv)
10: {
11: sqlite3 *acc;
12:
13: if (LoadConfig("/etc/mqtt.conf", &cfg)) {
14: printf("Error:: Load config #%d - %s\n", cfg_GetErrno(), cfg_GetError());
15: return 1;
16: }
17: if (!mqttLoadRTLM(&cfg, 0)) {
18: printf("Error:: Can't load RTL module\n");
19: return 2;
20: }
21:
22: acc = mqttOpenDB(&cfg, 0);
23: if (!acc)
24: goto end;
25:
26: mqttCloseDB(acc);
27:
28: end:
29: mqttUnloadRTLM(0);
30: UnloadConfig(&cfg);
31: return 0;
32: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>