summaryrefslogtreecommitdiff
path: root/indra/newview/llimview.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-08-28 22:30:09 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-08-28 22:30:09 +0000
commit51500f82e23b7deff9a0e1bc23f5bfa40aec1fb9 (patch)
tree2ed65f1dd0a8404eda670cf1fe2e37769758f74a /indra/newview/llimview.cpp
parentb2b980d6979b10a08b56c10b71c12ae4f9e6ff59 (diff)
svn merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0@1480 https://svn.aws.productengine.com/secondlife/pe/stable-2@1489 -> viewer-2.0.0-3
* EXT-97 EXT-576 EXT-593 EXT-613 EXT-649 EXT-697 EXT-707 EXT-708 EXT-726 EXT-737
Diffstat (limited to 'indra/newview/llimview.cpp')
-rw-r--r--indra/newview/llimview.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 404751a44a..5272bc2165 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -162,6 +162,14 @@ bool LLIMModel::newSession(LLUUID session_id, std::string name, EInstantMessage
}
+bool LLIMModel::clearSession(LLUUID session_id)
+{
+ if (sSessionsMap.find(session_id) == sSessionsMap.end()) return false;
+ delete (sSessionsMap[session_id]);
+ sSessionsMap.erase(session_id);
+ return true;
+}
+
std::list<LLSD> LLIMModel::getMessages(LLUUID session_id, int start_index)
{
std::list<LLSD> return_list;
@@ -1438,7 +1446,8 @@ LLUUID LLIMMgr::addSession(
}
// This removes the panel referenced by the uuid, and then restores
-// internal consistency. The internal pointer is not deleted.
+// internal consistency. The internal pointer is not deleted? Did you mean
+// a pointer to the corresponding LLIMSession? Session data is cleared now.
void LLIMMgr::removeSession(const LLUUID& session_id)
{
LLFloaterIMPanel* floater = findFloaterBySession(session_id);
@@ -1452,6 +1461,12 @@ void LLIMMgr::removeSession(const LLUUID& session_id)
clearPendingAgentListUpdates(session_id);
}
notifyObserverSessionRemoved(session_id);
+
+ //if we don't clear session data on removing the session
+ //we can't use LLBottomTray as observer of session creation/delettion and
+ //creating chiclets only on session created even, we need to handle chiclets creation
+ //the same way as LLFloaterIMPanels were managed.
+ LLIMModel::getInstance()->clearSession(session_id);
}
void LLIMMgr::inviteToSession(