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

Diff of /lbbs/src/section_list.c

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

Revision 1.35 by sysadm, Mon Jun 23 08:38:01 2025 UTC Revision 1.37 by sysadm, Wed Jun 25 02:49:20 2025 UTC
# Line 555  void section_list_cleanup(void) Line 555  void section_list_cleanup(void)
555          p_section_list_pool = NULL;          p_section_list_pool = NULL;
556  }  }
557    
558    void section_list_ex_menu_set_cleanup(void)
559    {
560            int i;
561    
562            for (i = 0; i < p_section_list_pool->section_count; i++)
563            {
564                    if (p_section_list_pool->sections[i].ex_menu_tm > 0)
565                    {
566                            unload_menu(&(p_section_list_pool->sections[i].ex_menu_set));
567                    }
568            }
569    }
570    
571  int set_section_list_shm_readonly(void)  int set_section_list_shm_readonly(void)
572  {  {
573          int shmid;          int shmid;
# Line 630  SECTION_LIST *section_list_create(int32_ Line 643  SECTION_LIST *section_list_create(int32_
643          p_section = p_section_list_pool->sections + p_section_list_pool->section_count;          p_section = p_section_list_pool->sections + p_section_list_pool->section_count;
644    
645          p_section->sid = sid;          p_section->sid = sid;
646            p_section->ex_menu_tm = 0;
647    
648          strncpy(p_section->sname, sname, sizeof(p_section->sname) - 1);          strncpy(p_section->sname, sname, sizeof(p_section->sname) - 1);
649          p_section->sname[sizeof(p_section->sname) - 1] = '\0';          p_section->sname[sizeof(p_section->sname) - 1] = '\0';
# Line 1695  int section_list_rd_lock(SECTION_LIST *p Line 1709  int section_list_rd_lock(SECTION_LIST *p
1709                          timer++;                          timer++;
1710                          if (timer % SECTION_TRY_LOCK_TIMES == 0)                          if (timer % SECTION_TRY_LOCK_TIMES == 0)
1711                          {                          {
1712                                  log_error("section_list_rd_lock() tried %d times on section %d\n", sid, timer);                                  log_error("section_list_try_rd_lock() tried %d times on section %d\n", sid, timer);
1713                          }                          }
1714                  }                  }
1715                  else // failed                  else // failed
1716                  {                  {
1717                          log_error("section_list_rd_lock() failed on section %d\n", sid);                          log_error("section_list_try_rd_lock() failed on section %d\n", sid);
1718                          break;                          break;
1719                  }                  }
1720          }          }
# Line 1726  int section_list_rw_lock(SECTION_LIST *p Line 1740  int section_list_rw_lock(SECTION_LIST *p
1740                          timer++;                          timer++;
1741                          if (timer % SECTION_TRY_LOCK_TIMES == 0)                          if (timer % SECTION_TRY_LOCK_TIMES == 0)
1742                          {                          {
1743                                  log_error("acquire_section_rw_lock() tried %d times on section %d\n", sid, timer);                                  log_error("section_list_try_rw_lock() tried %d times on section %d\n", sid, timer);
1744                          }                          }
1745                  }                  }
1746                  else // failed                  else // failed
1747                  {                  {
1748                          log_error("acquire_section_rw_lock() failed on section %d\n", sid);                          log_error("section_list_try_rw_lock() failed on section %d\n", sid);
1749                          break;                          break;
1750                  }                  }
1751          }          }


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

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