add: endpoint /tags

fix: leaks from config (now using static length for config strings)
This commit is contained in:
Tobias Reisinger 2020-06-13 19:21:32 +02:00
parent 0f1cd9c02c
commit a78815cb32
10 changed files with 147 additions and 16 deletions

9
main.c
View file

@ -25,8 +25,6 @@ terminate(int signum)
sqlite3_close(global_database);
free(global_config.database);
router_free();
exit(signum);
@ -51,9 +49,10 @@ main(int argc, const char** argv)
/******************** LOAD CONFIG ********************/
global_config.file = "core.ini";
global_config.not_found_file = "404.html";
global_config.not_found_content = "404 - NOT FOUND";
global_config.not_found_content_type = "text/plain";
strcpy(global_config.not_found_file, "404.html");
strcpy(global_config.not_found_file_type, "text/html");
strcpy(global_config.not_found_content, "404 - NOT FOUND");
strcpy(global_config.not_found_content_type, "text/plain");
global_config.log_level = LOG_LEVEL_INFO;
helper_parse_cli(argc, argv, &global_config);