--- lbbs/src/net_server.c 2025/11/19 04:15:51 1.93 +++ lbbs/src/net_server.c 2025/11/19 14:47:08 1.94 @@ -511,8 +511,6 @@ int net_server(const char *hostaddr, in_ int nfds; int notify_child_exit = 0; time_t tm_notify_child_exit = time(NULL); - MENU_SET bbs_menu_new; - MENU_SET top10_menu_new; int i, j; pid_t pid; int ssh_log_level = SSH_LOG_NOLOG; @@ -759,29 +757,24 @@ int net_server(const char *hostaddr, in_ log_error("Reload BWF conf failed\n"); } - if (load_menu(&bbs_menu_new, CONF_MENU) < 0) + if (detach_menu_shm(&bbs_menu) < 0) { - unload_menu(&bbs_menu_new); - log_error("Reload bbs menu failed\n"); + log_error("detach_menu_shm(bbs_menu) error\n"); } - else + if (load_menu(&bbs_menu, CONF_MENU) < 0) { + log_error("load_menu(bbs_menu) error\n"); unload_menu(&bbs_menu); - memcpy(&bbs_menu, &bbs_menu_new, sizeof(bbs_menu_new)); - log_common("Reload bbs menu successfully\n"); } - if (load_menu(&top10_menu_new, CONF_TOP10_MENU) < 0) + if (detach_menu_shm(&top10_menu) < 0) { - unload_menu(&top10_menu_new); - log_error("Reload top10 menu failed\n"); + log_error("detach_menu_shm(top10_menu) error\n"); } - else + if (load_menu(&top10_menu, CONF_TOP10_MENU) < 0) { + log_error("load_menu(top10_menu) error\n"); unload_menu(&top10_menu); - top10_menu_new.allow_exit = 1; - memcpy(&top10_menu, &top10_menu_new, sizeof(top10_menu_new)); - log_common("Reload top10 menu successfully\n"); } for (int i = 0; i < data_files_load_startup_count; i++) @@ -791,17 +784,12 @@ int net_server(const char *hostaddr, in_ log_error("load_file(%s) error\n", data_files_load_startup[i]); } } - log_common("Reload data files successfully\n"); // Load section config and gen_ex if (load_section_config_from_db(1) < 0) { log_error("load_section_config_from_db(1) error\n"); } - else - { - log_common("Reload section config and gen_ex successfully\n"); - } // Notify child processes to reload configuration if (kill(0, SIGUSR1) < 0)