/[LeafOK_CVS]/lbbs/src/net_server.c
ViewVC logotype

Diff of /lbbs/src/net_server.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.93 by sysadm, Wed Nov 19 04:15:51 2025 UTC Revision 1.94 by sysadm, Wed Nov 19 14:47:08 2025 UTC
# Line 511  int net_server(const char *hostaddr, in_ Line 511  int net_server(const char *hostaddr, in_
511          int nfds;          int nfds;
512          int notify_child_exit = 0;          int notify_child_exit = 0;
513          time_t tm_notify_child_exit = time(NULL);          time_t tm_notify_child_exit = time(NULL);
         MENU_SET bbs_menu_new;  
         MENU_SET top10_menu_new;  
514          int i, j;          int i, j;
515          pid_t pid;          pid_t pid;
516          int ssh_log_level = SSH_LOG_NOLOG;          int ssh_log_level = SSH_LOG_NOLOG;
# Line 759  int net_server(const char *hostaddr, in_ Line 757  int net_server(const char *hostaddr, in_
757                                  log_error("Reload BWF conf failed\n");                                  log_error("Reload BWF conf failed\n");
758                          }                          }
759    
760                          if (load_menu(&bbs_menu_new, CONF_MENU) < 0)                          if (detach_menu_shm(&bbs_menu) < 0)
761                          {                          {
762                                  unload_menu(&bbs_menu_new);                                  log_error("detach_menu_shm(bbs_menu) error\n");
                                 log_error("Reload bbs menu failed\n");  
763                          }                          }
764                          else                          if (load_menu(&bbs_menu, CONF_MENU) < 0)
765                          {                          {
766                                    log_error("load_menu(bbs_menu) error\n");
767                                  unload_menu(&bbs_menu);                                  unload_menu(&bbs_menu);
                                 memcpy(&bbs_menu, &bbs_menu_new, sizeof(bbs_menu_new));  
                                 log_common("Reload bbs menu successfully\n");  
768                          }                          }
769    
770                          if (load_menu(&top10_menu_new, CONF_TOP10_MENU) < 0)                          if (detach_menu_shm(&top10_menu) < 0)
771                          {                          {
772                                  unload_menu(&top10_menu_new);                                  log_error("detach_menu_shm(top10_menu) error\n");
                                 log_error("Reload top10 menu failed\n");  
773                          }                          }
774                          else                          if (load_menu(&top10_menu, CONF_TOP10_MENU) < 0)
775                          {                          {
776                                    log_error("load_menu(top10_menu) error\n");
777                                  unload_menu(&top10_menu);                                  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");  
778                          }                          }
779    
780                          for (int i = 0; i < data_files_load_startup_count; i++)                          for (int i = 0; i < data_files_load_startup_count; i++)
# Line 791  int net_server(const char *hostaddr, in_ Line 784  int net_server(const char *hostaddr, in_
784                                          log_error("load_file(%s) error\n", data_files_load_startup[i]);                                          log_error("load_file(%s) error\n", data_files_load_startup[i]);
785                                  }                                  }
786                          }                          }
                         log_common("Reload data files successfully\n");  
787    
788                          // Load section config and gen_ex                          // Load section config and gen_ex
789                          if (load_section_config_from_db(1) < 0)                          if (load_section_config_from_db(1) < 0)
790                          {                          {
791                                  log_error("load_section_config_from_db(1) error\n");                                  log_error("load_section_config_from_db(1) error\n");
792                          }                          }
                         else  
                         {  
                                 log_common("Reload section config and gen_ex successfully\n");  
                         }  
793    
794                          // Notify child processes to reload configuration                          // Notify child processes to reload configuration
795                          if (kill(0, SIGUSR1) < 0)                          if (kill(0, SIGUSR1) < 0)


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1