| 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 |
{ |
{ |
| 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 |
|
|