/[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.33 by sysadm, Thu May 15 05:14:57 2025 UTC Revision 1.34 by sysadm, Thu May 15 06:24:11 2025 UTC
# Line 47  int net_server(const char *hostaddr, in_ Line 47  int net_server(const char *hostaddr, in_
47          int nfds, epollfd;          int nfds, epollfd;
48          siginfo_t siginfo;          siginfo_t siginfo;
49          int sd_notify_stopping = 0;          int sd_notify_stopping = 0;
50            MENU_SET *p_bbs_menu_new;
51    
52          socket_server = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);          socket_server = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
53    
# Line 166  int net_server(const char *hostaddr, in_ Line 167  int net_server(const char *hostaddr, in_
167                  {                  {
168                          SYS_menu_reload = 0;                          SYS_menu_reload = 0;
169    
170                          unload_menu(p_bbs_menu);                          p_bbs_menu_new = calloc(1, sizeof(MENU_SET));
171                            if (p_bbs_menu_new == NULL)
                         if (load_menu(p_bbs_menu, CONF_MENU) < 0)  
172                          {                          {
173                                  unload_menu(p_bbs_menu);                                  log_error("OOM: calloc(MENU_SET)\n");
174                            }
175                            else if (load_menu(p_bbs_menu_new, CONF_MENU) < 0)
176                            {
177                                    unload_menu(p_bbs_menu_new);
178                                    free(p_bbs_menu_new);
179    
180                                  log_error("Reload menu failed\n");                                  log_error("Reload menu failed\n");
181                          }                          }
182                          else                          else
183                          {                          {
184                                    unload_menu_shm(p_bbs_menu_new);
185    
186                                    unload_menu(p_bbs_menu);
187                                    free(p_bbs_menu);
188    
189                                    p_bbs_menu = p_bbs_menu_new;
190                                    p_bbs_menu_new = NULL;
191    
192                                  log_std("Reload menu successfully\n");                                  log_std("Reload menu successfully\n");
193                          }                          }
194                  }                  }


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

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