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

Diff of /lbbs/src/user_stat.c

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

Revision 1.1 by sysadm, Thu Oct 23 04:09:33 2025 UTC Revision 1.3 by sysadm, Fri Oct 24 02:07:01 2025 UTC
# Line 74  int user_stat_map_update(USER_STAT_MAP * Line 74  int user_stat_map_update(USER_STAT_MAP *
74                          log_error("article_block_find_by_index(index=%d) error\n", i);                          log_error("article_block_find_by_index(index=%d) error\n", i);
75                          break;                          break;
76                  }                  }
77                    
78                    if (p_article->visible == 0)
79                    {
80                            continue;
81                    }
82    
83                  if (p_article->uid > p_map->last_uid)                  if (p_article->uid > p_map->last_uid)
84                  {                  {
85  #ifdef _DEBUG  #ifdef _DEBUG
86                          log_error("uid=%d of article(aid=%d) is greater than last_uid=%d, waiting for next user list update\n",                          log_error("uid=%d of article(aid=%d) is greater than last_uid=%d\n",
87                                            p_article->uid, p_article->aid, p_map->last_uid);                                            p_article->uid, p_article->aid, p_map->last_uid);
88  #endif  #endif
89                          break;                          continue;
90                  }                  }
91    
92                  if (user_stat_article_cnt_inc(p_map, p_article->uid, 1) < 0)                  if (user_stat_article_cnt_inc(p_map, p_article->uid, 1) < 0)
# Line 116  int user_stat_article_cnt_inc(USER_STAT_ Line 121  int user_stat_article_cnt_inc(USER_STAT_
121                  mid = (left + right) / 2;                  mid = (left + right) / 2;
122                  if (uid < p_map->stat_list[mid].uid)                  if (uid < p_map->stat_list[mid].uid)
123                  {                  {
124                          right = mid;                          right = mid - 1;
125                  }                  }
126                  else if (uid > p_map->stat_list[mid].uid)                  else if (uid > p_map->stat_list[mid].uid)
127                  {                  {
# Line 158  int user_stat_get(USER_STAT_MAP *p_map, Line 163  int user_stat_get(USER_STAT_MAP *p_map,
163                  mid = (left + right) / 2;                  mid = (left + right) / 2;
164                  if (uid < p_map->stat_list[mid].uid)                  if (uid < p_map->stat_list[mid].uid)
165                  {                  {
166                          right = mid;                          right = mid - 1;
167                  }                  }
168                  else if (uid > p_map->stat_list[mid].uid)                  else if (uid > p_map->stat_list[mid].uid)
169                  {                  {


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

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