Files
helmetc/server.c
Олег Бородин 9abd8a5e19 import
2025-10-01 11:21:05 +02:00

42 lines
676 B
C

#include <stdbool.h>
#include <stdio.h>
#include <unistd.h>
#include <logger.h>
#include <tconfig.h>
#include <massert.h>
int server_init(void) {
logger_dprintf("server init");
return 0;
}
int server_config(void) {
logger_dprintf("server config");
tconfig_t tconfig;
tconfig_init(&tconfig);
char* logpath = NULL;
tconfig_bind(&tconfig, TCONF_STR, "logpath", &logpath);
ssize_t rsize = tconfig_read(&tconfig, "helmet.conf");
int res = tconfig_parse(&tconfig);
MASSERT(res == -1);
tconfig_destroy(&tconfig);
logger_dprintf("logpath = %s", logpath);
return 0;
}
int server_run(void) {
logger_dprintf("server start");
return 0;
}