/[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.64 by sysadm, Mon Jun 23 08:47:56 2025 UTC Revision 1.66 by sysadm, Wed Jun 25 01:50:14 2025 UTC
# Line 258  int net_server(const char *hostaddr, in_ Line 258  int net_server(const char *hostaddr, in_
258          int nfds, epollfd;          int nfds, epollfd;
259          siginfo_t siginfo;          siginfo_t siginfo;
260          int sd_notify_stopping = 0;          int sd_notify_stopping = 0;
261          MENU_SET *p_bbs_menu_new;          MENU_SET bbs_menu_new;
262          int i, j;          int i, j;
263          pid_t pid;          pid_t pid;
264          int ssh_log_level = SSH_LOG_NOLOG;          int ssh_log_level = SSH_LOG_NOLOG;
# Line 419  int net_server(const char *hostaddr, in_ Line 419  int net_server(const char *hostaddr, in_
419                                  log_error("Reload conf failed\n");                                  log_error("Reload conf failed\n");
420                          }                          }
421    
422                          p_bbs_menu_new = calloc(1, sizeof(MENU_SET));                          if (load_menu(&bbs_menu_new, CONF_MENU) < 0)
                         if (p_bbs_menu_new == NULL)  
423                          {                          {
424                                  log_error("OOM: calloc(MENU_SET)\n");                                  unload_menu(&bbs_menu_new);
                         }  
                         else if (load_menu(p_bbs_menu_new, CONF_MENU) < 0)  
                         {  
                                 unload_menu(p_bbs_menu_new);  
                                 free(p_bbs_menu_new);  
                                 p_bbs_menu_new = NULL;  
   
425                                  log_error("Reload menu failed\n");                                  log_error("Reload menu failed\n");
426                          }                          }
427                          else                          else
428                          {                          {
429                                  unload_menu(p_bbs_menu);                                  memcpy(&bbs_menu, &bbs_menu_new, sizeof(bbs_menu_new));
                                 free(p_bbs_menu);  
   
                                 p_bbs_menu = p_bbs_menu_new;  
                                 p_bbs_menu_new = NULL;  
   
430                                  log_common("Reload menu successfully\n");                                  log_common("Reload menu successfully\n");
431                          }                          }
432    
# Line 469  int net_server(const char *hostaddr, in_ Line 456  int net_server(const char *hostaddr, in_
456    
457                          if (section_list_loader_reload() < 0)                          if (section_list_loader_reload() < 0)
458                          {                          {
459                                  log_error("ksection_list_loader_reload() failed\n");                                  log_error("section_list_loader_reload() failed\n");
460                          }                          }
461                  }                  }
462    


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

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