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

Diff of /lbbs/src/section_list_loader.c

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

Revision 1.34 by sysadm, Tue Jun 24 10:01:24 2025 UTC Revision 1.36 by sysadm, Wed Jun 25 01:50:14 2025 UTC
# Line 134  int load_section_config_from_db(int relo Line 134  int load_section_config_from_db(int relo
134                                  break;                                  break;
135                          }                          }
136    
137                          strncpy(p_section->sname, row[0], sizeof(p_section->sname) - 1);                          strncpy(p_section->sname, row[1], sizeof(p_section->sname) - 1);
138                          p_section->sname[sizeof(p_section->sname) - 1] = '\0';                          p_section->sname[sizeof(p_section->sname) - 1] = '\0';
139                          strncpy(p_section->stitle, row[1], sizeof(p_section->stitle) - 1);                          strncpy(p_section->stitle, row[2], sizeof(p_section->stitle) - 1);
140                          p_section->stitle[sizeof(p_section->stitle) - 1] = '\0';                          p_section->stitle[sizeof(p_section->stitle) - 1] = '\0';
141                          strncpy(p_section->master_list, master_list, sizeof(p_section->master_list) - 1);                          strncpy(p_section->master_list, master_list, sizeof(p_section->master_list) - 1);
142                          p_section->master_list[sizeof(p_section->master_list) - 1] = '\0';                          p_section->master_list[sizeof(p_section->master_list) - 1] = '\0';
# Line 155  int load_section_config_from_db(int relo Line 155  int load_section_config_from_db(int relo
155                          ret = load_menu(&ex_menu_set_new, ex_menu_conf);                          ret = load_menu(&ex_menu_set_new, ex_menu_conf);
156                          if (ret < 0)                          if (ret < 0)
157                          {                          {
                                 log_error("load_menu(%s) error: %d\n", ex_menu_conf, ret);  
158                                  unload_menu(&ex_menu_set_new);                                  unload_menu(&ex_menu_set_new);
159                                    log_error("load_menu(%s) error: %d\n", ex_menu_conf, ret);
160                          }                          }
161                          else                          else
162                          {                          {
# Line 167  int load_section_config_from_db(int relo Line 167  int load_section_config_from_db(int relo
167    
168                                  ex_menu_set_new.allow_exit = 1; // Allow exit menu                                  ex_menu_set_new.allow_exit = 1; // Allow exit menu
169                                  memcpy(&(p_section->ex_menu_set), &ex_menu_set_new, sizeof(ex_menu_set_new));                                  memcpy(&(p_section->ex_menu_set), &ex_menu_set_new, sizeof(ex_menu_set_new));
                                 set_menu_shm_readonly(&(p_section->ex_menu_set));  
170    
171                                  p_section->ex_menu_tm = atol(row[7]);                                  p_section->ex_menu_tm = atol(row[7]);
172  #ifdef _DEBUG  #ifdef _DEBUG
# Line 701  int section_list_loader_launch(void) Line 700  int section_list_loader_launch(void)
700          SYS_child_process_count = 0;          SYS_child_process_count = 0;
701    
702          // Detach menu in shared memory          // Detach menu in shared memory
703          detach_menu_shm(p_bbs_menu);          detach_menu_shm(&bbs_menu);
         free(p_bbs_menu);  
         p_bbs_menu = NULL;  
704    
705          // Set signal handler          // Set signal handler
706          act.sa_handler = SIG_DFL;          act.sa_handler = SIG_DFL;


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

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