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

Diff of /lbbs/src/user_list.c

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

Revision 1.28 by sysadm, Tue Nov 4 14:58:56 2025 UTC Revision 1.30 by sysadm, Thu Nov 6 10:58:03 2025 UTC
# Line 33  union semun Line 33  union semun
33  };  };
34  #endif // #ifdef _SEM_SEMUN_UNDEFINED  #endif // #ifdef _SEM_SEMUN_UNDEFINED
35    
36  #define USER_LIST_TRY_LOCK_WAIT_TIME 1 // second  enum _user_list_constant_t
37  #define USER_LIST_TRY_LOCK_TIMES 10  {
38            USER_LIST_TRY_LOCK_WAIT_TIME = 1, // second
39            USER_LIST_TRY_LOCK_TIMES = 10,
40    };
41    
42  struct user_list_pool_t  struct user_list_pool_t
43  {  {
# Line 335  int user_online_list_load(MYSQL *db, USE Line 338  int user_online_list_load(MYSQL *db, USE
338                  }                  }
339    
340                  qsort(p_online_list->index_uid, (size_t)user_cnt, sizeof(USER_INFO_INDEX_UID), user_info_index_uid_comp);                  qsort(p_online_list->index_uid, (size_t)user_cnt, sizeof(USER_INFO_INDEX_UID), user_info_index_uid_comp);
   
 #ifdef _DEBUG  
                 log_error("Rebuild index of %d online users\n", user_cnt);  
 #endif  
341          }          }
342    
343          p_online_list->user_count = user_cnt;          p_online_list->user_count = user_cnt;
344          p_online_list->guest_count = guest_cnt;          p_online_list->guest_count = guest_cnt;
345    
 #ifdef _DEBUG  
         log_error("Loaded %d online users and %d guest users\n", p_list->user_count, p_list->guest_count);  
 #endif  
   
346  cleanup:  cleanup:
347          mysql_free_result(rs);          mysql_free_result(rs);
348    


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

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