/[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.34 by sysadm, Fri May 16 14:09:31 2025 UTC Revision 1.39 by sysadm, Sun May 25 06:55:23 2025 UTC
# Line 145  int main(int argc, char *argv[]) Line 145  int main(int argc, char *argv[])
145                  return -2;                  return -2;
146          }          }
147    
148            // Initialize trie dict pool
149            if (trie_dict_init(CONF_BBSD) < 0)
150            {
151                    printf("trie_dict_init failed\n");
152                    return -3;
153            }
154    
155            // Load BBS cmd
156            if (load_cmd() < 0)
157            {
158                    return -3;
159            }
160    
161          // Load menus          // Load menus
162          p_bbs_menu = calloc(1, sizeof(MENU_SET));          p_bbs_menu = calloc(1, sizeof(MENU_SET));
163          if (p_bbs_menu == NULL)          if (p_bbs_menu == NULL)
# Line 158  int main(int argc, char *argv[]) Line 171  int main(int argc, char *argv[])
171                  free(p_bbs_menu);                  free(p_bbs_menu);
172                  return -3;                  return -3;
173          }          }
         unload_menu_shm(p_bbs_menu);  
174    
175          // Load data files          // Load data files
176          if (file_loader_init(FILE_MMAP_COUNT_LIMIT) < 0)          if (file_loader_init() < 0)
177          {          {
178                  log_error("file_loader_init() error\n");                  log_error("file_loader_init() error\n");
179                  return -4;                  return -4;
180          }          }
181          for (int i = 0; i < data_files_load_startup_count; i++)          for (int i = 0; i < data_files_load_startup_count; i++)
182          {          {
183                  if (load_file_mmap(data_files_load_startup[i]) < 0)                  if (load_file(data_files_load_startup[i]) < 0)
184                  {                  {
185                          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]);
186                  }                  }
# Line 190  int main(int argc, char *argv[]) Line 202  int main(int argc, char *argv[])
202          free(p_bbs_menu);          free(p_bbs_menu);
203          p_bbs_menu = NULL;          p_bbs_menu = NULL;
204    
205            // Cleanup trie dict pool
206            trie_dict_cleanup();
207    
208          log_std("Main process exit normally\n");          log_std("Main process exit normally\n");
209                    
210          return 0;          return 0;


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

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