| 246 |
// Load menus |
// Load menus |
| 247 |
if (load_menu(&bbs_menu, CONF_MENU) < 0) |
if (load_menu(&bbs_menu, CONF_MENU) < 0) |
| 248 |
{ |
{ |
| 249 |
log_error("load_menu(%s) error\n", CONF_MENU); |
log_error("load_menu(bbs_menu) error\n"); |
| 250 |
goto cleanup; |
goto cleanup; |
| 251 |
} |
} |
| 252 |
if (load_menu(&top10_menu, CONF_TOP10_MENU) < 0) |
if (load_menu(&top10_menu, CONF_TOP10_MENU) < 0) |
| 253 |
{ |
{ |
| 254 |
log_error("load_menu(%s) error\n", CONF_TOP10_MENU); |
log_error("load_menu(top10_menu) error\n"); |
| 255 |
goto cleanup; |
goto cleanup; |
| 256 |
} |
} |
| 257 |
top10_menu.allow_exit = 1; |
top10_menu.allow_exit = 1; |
| 258 |
|
|
| 259 |
// Load data files |
// Load data files |
|
if (file_loader_init() < 0) |
|
|
{ |
|
|
log_error("file_loader_init() error\n"); |
|
|
goto cleanup; |
|
|
} |
|
| 260 |
for (int i = 0; i < data_files_load_startup_count; i++) |
for (int i = 0; i < data_files_load_startup_count; i++) |
| 261 |
{ |
{ |
| 262 |
if (load_file(data_files_load_startup[i]) < 0) |
if (load_file(data_files_load_startup[i]) < 0) |
| 379 |
} |
} |
| 380 |
|
|
| 381 |
// Cleanup loaded data files |
// Cleanup loaded data files |
| 382 |
file_loader_cleanup(); |
for (int i = 0; i < data_files_load_startup_count; i++) |
| 383 |
|
{ |
| 384 |
|
if (unload_file(data_files_load_startup[i]) < 0) |
| 385 |
|
{ |
| 386 |
|
log_error("unload_file(%s) error\n", data_files_load_startup[i]); |
| 387 |
|
} |
| 388 |
|
} |
| 389 |
|
|
| 390 |
// Cleanup menu |
// Cleanup menu |
| 391 |
unload_menu(&bbs_menu); |
unload_menu(&bbs_menu); |
| 397 |
trie_dict_cleanup(); |
trie_dict_cleanup(); |
| 398 |
user_list_pool_cleanup(); |
user_list_pool_cleanup(); |
| 399 |
|
|
|
// Cleanup BWF |
|
|
bwf_unload(); |
|
|
|
|
| 400 |
if (unlink(VAR_ARTICLE_BLOCK_SHM) < 0) |
if (unlink(VAR_ARTICLE_BLOCK_SHM) < 0) |
| 401 |
{ |
{ |
| 402 |
log_error("unlink(%s) error\n", VAR_ARTICLE_BLOCK_SHM); |
log_error("unlink(%s) error\n", VAR_ARTICLE_BLOCK_SHM); |