| 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 |
// Load BBS cmd |
| 156 |
if (load_cmd() < 0) |
if (load_cmd() < 0) |
| 157 |
{ |
{ |
| 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() < 0) |
if (file_loader_init() < 0) |
| 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_shm(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 |
} |
} |
| 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; |