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

Diff of /lbbs/src/main.c

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

Revision 1.82 by sysadm, Tue Nov 18 15:38:49 2025 UTC Revision 1.86 by sysadm, Fri Nov 21 10:34:10 2025 UTC
# Line 246  int main(int argc, char *argv[]) Line 246  int main(int argc, char *argv[])
246          // Load menus          // Load menus
247          if (load_menu(&bbs_menu, CONF_MENU) < 0)          if (load_menu(&bbs_menu, CONF_MENU) < 0)
248          {          {
249                  log_error("load_menu(%s) error\n", CONF_MENU);                  log_error("load_menu(bbs_menu) error\n");
250                  goto cleanup;                  goto cleanup;
251          }          }
252          if (load_menu(&top10_menu, CONF_TOP10_MENU) < 0)          if (load_menu(&top10_menu, CONF_TOP10_MENU) < 0)
253          {          {
254                  log_error("load_menu(%s) error\n", CONF_TOP10_MENU);                  log_error("load_menu(top10_menu) error\n");
255                  goto cleanup;                  goto cleanup;
256          }          }
257          top10_menu.allow_exit = 1;          top10_menu.allow_exit = 1;
258    
259          // Load data files          // Load data files
         if (file_loader_init() < 0)  
         {  
                 log_error("file_loader_init() error\n");  
                 goto cleanup;  
         }  
260          for (int i = 0; i < data_files_load_startup_count; i++)          for (int i = 0; i < data_files_load_startup_count; i++)
261          {          {
262                  if (load_file(data_files_load_startup[i]) < 0)                  if (load_file(data_files_load_startup[i]) < 0)
# Line 384  cleanup: Line 379  cleanup:
379          }          }
380    
381          // Cleanup loaded data files          // Cleanup loaded data files
382          file_loader_cleanup();          for (int i = 0; i < data_files_load_startup_count; i++)
383            {
384                    if (unload_file(data_files_load_startup[i]) < 0)
385                    {
386                            log_error("unload_file(%s) error\n", data_files_load_startup[i]);
387                    }
388            }
389    
390          // Cleanup menu          // Cleanup menu
391          unload_menu(&bbs_menu);          unload_menu(&bbs_menu);
# Line 396  cleanup: Line 397  cleanup:
397          trie_dict_cleanup();          trie_dict_cleanup();
398          user_list_pool_cleanup();          user_list_pool_cleanup();
399    
         // Cleanup BWF  
         bwf_unload();  
   
400          if (unlink(VAR_ARTICLE_BLOCK_SHM) < 0)          if (unlink(VAR_ARTICLE_BLOCK_SHM) < 0)
401          {          {
402                  log_error("unlink(%s) error\n", VAR_ARTICLE_BLOCK_SHM);                  log_error("unlink(%s) error\n", VAR_ARTICLE_BLOCK_SHM);


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

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