diff options
author | Matthew Breindel (Falcon) <falcon@lindenlab.com> | 2010-04-01 17:03:59 -0700 |
---|---|---|
committer | Matthew Breindel (Falcon) <falcon@lindenlab.com> | 2010-04-01 17:03:59 -0700 |
commit | b1ae22c3eb71767219ebb96ec80011e10bbfabbe (patch) | |
tree | 41eb0fd5eb7f4986f99ce2a0d11273c32f33e7d1 /indra/newview/llimview.cpp | |
parent | f17cfd952a274cc6c684e50db004d62373a49d1f (diff) | |
parent | 9bdbc10aba78d7c6fec832ee4c411b483f05c441 (diff) |
Merge
Diffstat (limited to 'indra/newview/llimview.cpp')
-rw-r--r-- | indra/newview/llimview.cpp | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 0099cd114f..e0f155a6a9 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -81,6 +81,9 @@ const static std::string ADHOC_NAME_SUFFIX(" Conference"); const static std::string NEARBY_P2P_BY_OTHER("nearby_P2P_by_other"); const static std::string NEARBY_P2P_BY_AGENT("nearby_P2P_by_agent"); +/** Timeout of outgoing session initialization (in seconds) */ +const static U32 SESSION_INITIALIZATION_TIMEOUT = 30; + std::string LLCallDialogManager::sPreviousSessionlName = ""; LLIMModel::LLIMSession::SType LLCallDialogManager::sPreviousSessionType = LLIMModel::LLIMSession::P2P_SESSION; std::string LLCallDialogManager::sCurrentSessionlName = ""; @@ -92,6 +95,19 @@ const LLUUID LLOutgoingCallDialog::OCD_KEY = LLUUID("7CF78E11-0CFE-498D-ADB9-141 // LLIMMgr* gIMMgr = NULL; + +BOOL LLSessionTimeoutTimer::tick() +{ + if (mSessionId.isNull()) return TRUE; + + LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(mSessionId); + if (session && !session->mSessionInitialized) + { + gIMMgr->showSessionStartError("session_initialization_timed_out_error", mSessionId); + } + return TRUE; +} + void toast_callback(const LLSD& msg){ // do not show toast in busy mode or it goes from agent if (gAgent.getBusy() || gAgent.getID() == msg["from_id"]) @@ -215,6 +231,11 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& //so we're already initialized mSessionInitialized = true; } + else + { + //tick returns TRUE - timer will be deleted after the tick + new LLSessionTimeoutTimer(mSessionID, SESSION_INITIALIZATION_TIMEOUT); + } if (IM_NOTHING_SPECIAL == type) { @@ -1539,6 +1560,11 @@ LLCallDialog::LLCallDialog(const LLSD& payload) setDocked(true); } +LLCallDialog::~LLCallDialog() +{ + LLUI::removePopup(this); +} + void LLCallDialog::getAllowedRect(LLRect& rect) { rect = gViewerWindow->getWorldViewRectScaled(); @@ -1592,7 +1618,7 @@ void LLCallDialog::onOpen(const LLSD& key) LLDockableFloater::onOpen(key); // it should be over the all floaters. EXT-5116 - gFloaterView->bringToFront(this, FALSE); + LLUI::addPopup(this); } void LLCallDialog::setIcon(const LLSD& session_id, const LLSD& participant_id) |