Fix config string handling
This commit is contained in:
parent
b7d3f2ad0b
commit
ead52a0f47
3 changed files with 95 additions and 33 deletions
include
|
@ -15,25 +15,35 @@ typedef enum
|
|||
typedef struct
|
||||
{
|
||||
char *file;
|
||||
char database[256];
|
||||
char user[256];
|
||||
char group[256];
|
||||
char *include;
|
||||
char *database;
|
||||
char *user;
|
||||
char *group;
|
||||
int log_level;
|
||||
FILE *log_file;
|
||||
run_type_t run_type;
|
||||
uint16_t server_port;
|
||||
uint16_t discovery_port;
|
||||
uint16_t mqtt_port;
|
||||
char content_dir[1024];
|
||||
char not_found_file[256];
|
||||
char not_found_file_type[256];
|
||||
char not_found_content[256];
|
||||
char not_found_content_type[256];
|
||||
char *content_dir;
|
||||
char *not_found_file;
|
||||
char *not_found_file_type;
|
||||
char *not_found_content;
|
||||
char *not_found_content_type;
|
||||
struct mg_serve_http_opts http_server_opts;
|
||||
} config_t;
|
||||
|
||||
extern config_t global_config;
|
||||
|
||||
void
|
||||
config_init();
|
||||
|
||||
void
|
||||
config_free();
|
||||
|
||||
void
|
||||
config_try_ini_files(config_t *config);
|
||||
|
||||
int
|
||||
config_load(IniDispatch *disp, void *config_void);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue