1
This commit is contained in:
parent
93f07b409f
commit
6d196eb844
@ -11,7 +11,7 @@
|
||||
|
||||
void CacheMgr::Init()
|
||||
{
|
||||
|
||||
INIT_LIST_HEAD(&friend_list_);
|
||||
}
|
||||
|
||||
void CacheMgr::UnInit()
|
||||
@ -35,6 +35,7 @@ void CacheMgr::_SS_IM_UserOnline(f8::MsgHdr& hdr, const ss::SS_IM_UserOnline& ms
|
||||
if (!friend_data) {
|
||||
friend_data = new Friend();
|
||||
list_add_tail(&friend_data->human_entry, &svr_node->human_list);
|
||||
list_add_tail(&friend_data->cache_entry, &friend_list_);
|
||||
friend_data->svr_node = svr_node;
|
||||
friend_hash_[user_info.base_data().account_id()] = friend_data;
|
||||
} else {
|
||||
|
@ -25,4 +25,5 @@ class CacheMgr : public a8::Singleton<CacheMgr>
|
||||
private:
|
||||
|
||||
std::map<std::string, Friend*> friend_hash_;
|
||||
list_head friend_list_;
|
||||
};
|
||||
|
@ -37,11 +37,13 @@ struct Friend
|
||||
BaseUserData base_data;
|
||||
UserTempCustomData temp_custom_data;
|
||||
|
||||
list_head cache_entry;
|
||||
list_head human_entry;
|
||||
struct SvrNode* svr_node = nullptr;
|
||||
|
||||
Friend()
|
||||
{
|
||||
INIT_LIST_HEAD(&human_entry);
|
||||
INIT_LIST_HEAD(&cache_entry);
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user