diff options
Diffstat (limited to 'indra/newview/llconversationlog.cpp')
-rw-r--r-- | indra/newview/llconversationlog.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp index 8c86871134..ff1f819d7d 100644 --- a/indra/newview/llconversationlog.cpp +++ b/indra/newview/llconversationlog.cpp @@ -185,7 +185,8 @@ void LLConversationLogFriendObserver::changed(U32 mask) /* LLConversationLog implementation */ /************************************************************************/ -LLConversationLog::LLConversationLog() +LLConversationLog::LLConversationLog() : + mAvatarNameCacheConnection() { LLControlVariable* log_instant_message = gSavedPerAccountSettings.getControl("LogInstantMessages").get(); LLControlVariable* keep_convers_log = gSavedSettings.getControl("KeepConversationLogTranscripts").get(); @@ -262,7 +263,11 @@ void LLConversationLog::createConversation(const LLIMModel::LLIMSession* session if (LLIMModel::LLIMSession::P2P_SESSION == session->mSessionType) { - LLAvatarNameCache::get(session->mOtherParticipantID, boost::bind(&LLConversationLog::onAvatarNameCache, this, _1, _2, session)); + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } + mAvatarNameCacheConnection = LLAvatarNameCache::get(session->mOtherParticipantID, boost::bind(&LLConversationLog::onAvatarNameCache, this, _1, _2, session)); } notifyObservers(); @@ -522,5 +527,6 @@ void LLConversationLog::onNewMessageReceived(const LLSD& data) void LLConversationLog::onAvatarNameCache(const LLUUID& participant_id, const LLAvatarName& av_name, const LLIMModel::LLIMSession* session) { + mAvatarNameCacheConnection.disconnect(); updateConversationName(session, av_name.getCompleteName()); } |