/[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.66 by sysadm, Wed Jun 25 01:50:14 2025 UTC Revision 1.68 by sysadm, Thu Jun 26 12:17:02 2025 UTC
# Line 25  Line 25 
25  #include "login.h"  #include "login.h"
26  #include "menu.h"  #include "menu.h"
27  #include "net_server.h"  #include "net_server.h"
28    #include "section_list.h"
29  #include "section_list_loader.h"  #include "section_list_loader.h"
30  #include <errno.h>  #include <errno.h>
31  #include <fcntl.h>  #include <fcntl.h>
# Line 426  int net_server(const char *hostaddr, in_ Line 427  int net_server(const char *hostaddr, in_
427                          }                          }
428                          else                          else
429                          {                          {
430                                    unload_menu(&bbs_menu);
431                                  memcpy(&bbs_menu, &bbs_menu_new, sizeof(bbs_menu_new));                                  memcpy(&bbs_menu, &bbs_menu_new, sizeof(bbs_menu_new));
432                                  log_common("Reload menu successfully\n");                                  log_common("Reload menu successfully\n");
433                          }                          }
434    
                         sd_notify(0, "READY=1");  
                 }  
   
                 if (SYS_data_file_reload && !SYS_server_exit)  
                 {  
                         SYS_data_file_reload = 0;  
                         sd_notify(0, "RELOADING=1");  
   
435                          for (int i = 0; i < data_files_load_startup_count; i++)                          for (int i = 0; i < data_files_load_startup_count; i++)
436                          {                          {
437                                  if (load_file(data_files_load_startup[i]) < 0)                                  if (load_file(data_files_load_startup[i]) < 0)
# Line 445  int net_server(const char *hostaddr, in_ Line 439  int net_server(const char *hostaddr, in_
439                                          log_error("load_file_mmap(%s) error\n", data_files_load_startup[i]);                                          log_error("load_file_mmap(%s) error\n", data_files_load_startup[i]);
440                                  }                                  }
441                          }                          }
   
442                          log_common("Reload data files successfully\n");                          log_common("Reload data files successfully\n");
                         sd_notify(0, "READY=1");  
                 }  
   
                 if (SYS_section_list_reload && !SYS_server_exit)  
                 {  
                         SYS_section_list_reload = 0;  
443    
444                          if (section_list_loader_reload() < 0)                          // Load section config and gen_ex
445                            if (load_section_config_from_db(1) < 0)
446                            {
447                                    log_error("load_section_config_from_db(1) error\n");
448                            }
449                            else
450                          {                          {
451                                  log_error("section_list_loader_reload() failed\n");                                  log_common("Reload section config and gen_ex successfully\n");
452                          }                          }
453    
454                            sd_notify(0, "READY=1");
455                  }                  }
456    
457                  nfds = epoll_wait(epollfd, events, MAX_EVENTS, 100); // 0.1 second                  nfds = epoll_wait(epollfd, events, MAX_EVENTS, 100); // 0.1 second


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

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