--- lbbs/src/main.c 2025/11/18 15:38:49 1.82 +++ lbbs/src/main.c 2025/11/21 10:34:10 1.86 @@ -246,22 +246,17 @@ int main(int argc, char *argv[]) // Load menus if (load_menu(&bbs_menu, CONF_MENU) < 0) { - log_error("load_menu(%s) error\n", CONF_MENU); + log_error("load_menu(bbs_menu) error\n"); goto cleanup; } if (load_menu(&top10_menu, CONF_TOP10_MENU) < 0) { - log_error("load_menu(%s) error\n", CONF_TOP10_MENU); + log_error("load_menu(top10_menu) error\n"); goto cleanup; } top10_menu.allow_exit = 1; // Load data files - if (file_loader_init() < 0) - { - log_error("file_loader_init() error\n"); - goto cleanup; - } for (int i = 0; i < data_files_load_startup_count; i++) { if (load_file(data_files_load_startup[i]) < 0) @@ -384,7 +379,13 @@ cleanup: } // Cleanup loaded data files - file_loader_cleanup(); + for (int i = 0; i < data_files_load_startup_count; i++) + { + if (unload_file(data_files_load_startup[i]) < 0) + { + log_error("unload_file(%s) error\n", data_files_load_startup[i]); + } + } // Cleanup menu unload_menu(&bbs_menu); @@ -396,9 +397,6 @@ cleanup: trie_dict_cleanup(); user_list_pool_cleanup(); - // Cleanup BWF - bwf_unload(); - if (unlink(VAR_ARTICLE_BLOCK_SHM) < 0) { log_error("unlink(%s) error\n", VAR_ARTICLE_BLOCK_SHM);