summaryrefslogtreecommitdiff
path: root/indra/newview/llconversationlog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llconversationlog.cpp')
-rw-r--r--indra/newview/llconversationlog.cpp22
1 files changed, 19 insertions, 3 deletions
diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp
index 8c3d2219bc..cea68c1779 100644
--- a/indra/newview/llconversationlog.cpp
+++ b/indra/newview/llconversationlog.cpp
@@ -190,6 +190,22 @@ LLConversationLog::LLConversationLog() :
{
}
+LLConversationLog::~LLConversationLog()
+{
+ if (mLoggingEnabled)
+ {
+ if (LLIMMgr::instanceExists())
+ {
+ LLIMMgr::instance().removeSessionObserver(this);
+ }
+ LLAvatarTracker::instance().removeObserver(mFriendObserver);
+ }
+ if (mAvatarNameCacheConnection.connected())
+ {
+ mAvatarNameCacheConnection.disconnect();
+ }
+}
+
void LLConversationLog::enableLogging(S32 log_mode)
{
mLoggingEnabled = log_mode > 0;
@@ -215,7 +231,7 @@ void LLConversationLog::enableLogging(S32 log_mode)
notifyObservers();
}
-void LLConversationLog::logConversation(const LLUUID& session_id, BOOL has_offline_msg)
+void LLConversationLog::logConversation(const LLUUID& session_id, bool has_offline_msg)
{
const LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(session_id);
LLConversation* conversation = findConversation(session);
@@ -272,7 +288,7 @@ void LLConversationLog::updateConversationName(const LLIMModel::LLIMSession* ses
}
}
-void LLConversationLog::updateOfflineIMs(const LLIMModel::LLIMSession* session, BOOL new_messages)
+void LLConversationLog::updateOfflineIMs(const LLIMModel::LLIMSession* session, bool new_messages)
{
if (!session)
{
@@ -354,7 +370,7 @@ void LLConversationLog::removeObserver(LLConversationLogObserver* observer)
mObservers.erase(observer);
}
-void LLConversationLog::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, BOOL has_offline_msg)
+void LLConversationLog::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, bool has_offline_msg)
{
logConversation(session_id, has_offline_msg);
}