summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/app_settings/settings.xml23
-rw-r--r--indra/newview/llavataractions.cpp18
-rw-r--r--indra/newview/llavataractions.h1
-rw-r--r--indra/newview/llcommandhandler.cpp13
-rw-r--r--indra/newview/llimview.cpp30
-rw-r--r--indra/newview/llimview.h7
-rw-r--r--indra/newview/llpanelimcontrolpanel.cpp8
-rw-r--r--indra/newview/llpanelimcontrolpanel.h4
-rw-r--r--indra/newview/llstartup.cpp9
-rw-r--r--indra/newview/lltexturefetch.cpp10
-rw-r--r--indra/newview/llworld.cpp1
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml17
12 files changed, 92 insertions, 49 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index c43032a3cf..80a3977d02 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -4974,7 +4974,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>StartUpToastLifeTime</key>
<key>NearbyToastFadingTime</key>
<map>
<key>Comment</key>
@@ -9911,6 +9910,28 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>UseCircuitCodeMaxRetries</key>
+ <map>
+ <key>Comment</key>
+ <string>Max timeout count for the initial UseCircuitCode message</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <real>3</real>
+ </map>
+ <key>UseCircuitCodeTimeout</key>
+ <map>
+ <key>Comment</key>
+ <string>Timeout duration in seconds for the initial UseCircuitCode message</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>5.0</real>
+ </map>
<key>UseDebugLogin</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 5af023f565..5f90a7627f 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -62,9 +62,6 @@
#include "llimfloater.h"
#include "lltrans.h"
-// callback connection to auto-call when the IM floater initializes
-boost::signals2::connection gAdhocAutoCall;
-
// static
void LLAvatarActions::requestFriendshipDialog(const LLUUID& id, const std::string& name)
{
@@ -250,8 +247,8 @@ void LLAvatarActions::startAdhocCall(const std::vector<LLUUID>& ids)
// always open IM window when connecting to voice
LLIMFloater::show(session_id);
- // start the call once the floater has fully initialized
- gAdhocAutoCall = LLIMModel::getInstance()->addSessionInitializedCallback(callbackAutoStartCall);
+ // start the call once the session has fully initialized
+ gIMMgr->autoStartCallOnStartup(session_id);
make_ui_sound("UISndStartIM");
}
@@ -467,17 +464,6 @@ bool LLAvatarActions::callbackAddFriend(const LLSD& notification, const LLSD& re
}
// static
-void LLAvatarActions::callbackAutoStartCall(const LLSD& data)
-{
- // start the adhoc voice call now the IM panel has initialized
- LLUUID session_id = data["session_id"].asUUID();
- gIMMgr->startCall(session_id);
-
- // and deschedule this callback as its work is done now
- gAdhocAutoCall.disconnect();
-}
-
-// static
void LLAvatarActions::requestFriendship(const LLUUID& target_id, const std::string& target_name, const std::string& message)
{
const LLUUID calling_card_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CALLINGCARD);
diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h
index 4c9851a48d..2dd2a4c4b1 100644
--- a/indra/newview/llavataractions.h
+++ b/indra/newview/llavataractions.h
@@ -139,7 +139,6 @@ private:
static bool handleRemove(const LLSD& notification, const LLSD& response);
static bool handlePay(const LLSD& notification, const LLSD& response, LLUUID avatar_id);
static void callback_invite_to_group(LLUUID group_id, LLUUID id);
- static void callbackAutoStartCall(const LLSD& data);
// Just request friendship, no dialog.
static void requestFriendship(const LLUUID& target_id, const std::string& target_name, const std::string& message);
diff --git a/indra/newview/llcommandhandler.cpp b/indra/newview/llcommandhandler.cpp
index af6488388a..1d92661ea2 100644
--- a/indra/newview/llcommandhandler.cpp
+++ b/indra/newview/llcommandhandler.cpp
@@ -34,6 +34,7 @@
#include "llviewerprecompiledheaders.h"
#include "llcommandhandler.h"
+#include "llnotificationsutil.h"
// system includes
#include <boost/tokenizer.hpp>
@@ -93,6 +94,8 @@ bool LLCommandHandlerRegistry::dispatch(const std::string& cmd,
LLMediaCtrl* web,
bool trusted_browser)
{
+ static bool slurl_blocked = false;
+ static bool slurl_throttled = false;
static F64 last_throttle_time = 0.0;
F64 cur_time = 0.0;
std::map<std::string, LLCommandHandlerInfo>::iterator it = mMap.find(cmd);
@@ -110,6 +113,11 @@ bool LLCommandHandlerRegistry::dispatch(const std::string& cmd,
// block request from external browser, but report as
// "handled" because it was well formatted.
LL_WARNS_ONCE("SLURL") << "Blocked SLURL command from untrusted browser" << LL_ENDL;
+ if (! slurl_blocked)
+ {
+ LLNotificationsUtil::add("BlockedSLURL");
+ slurl_blocked = true;
+ }
return true;
case LLCommandHandler::UNTRUSTED_THROTTLE:
@@ -119,6 +127,11 @@ bool LLCommandHandlerRegistry::dispatch(const std::string& cmd,
// block request from external browser if it happened
// within THROTTLE_PERIOD secs of the last command
LL_WARNS_ONCE("SLURL") << "Throttled SLURL command from untrusted browser" << LL_ENDL;
+ if (! slurl_throttled)
+ {
+ LLNotificationsUtil::add("ThrottledSLURL");
+ slurl_throttled = true;
+ }
return true;
}
last_throttle_time = cur_time;
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 6c4af0522f..4780b51c55 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -158,7 +158,8 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string&
mSessionInitialized(false),
mCallBackEnabled(true),
mTextIMPossible(true),
- mOtherParticipantIsAvatar(true)
+ mOtherParticipantIsAvatar(true),
+ mStartCallOnInitialize(false)
{
if (IM_NOTHING_SPECIAL == type || IM_SESSION_P2P_INVITE == type)
{
@@ -413,6 +414,12 @@ void LLIMModel::processSessionInitializedReply(const LLUUID& old_session_id, con
{
im_floater->sessionInitReplyReceived(new_session_id);
}
+
+ // auto-start the call on session initialization?
+ if (session->mStartCallOnInitialize)
+ {
+ gIMMgr->startCall(new_session_id);
+ }
}
//*TODO remove this "floater" stuff when Communicate Floater is gone
@@ -995,18 +1002,6 @@ bool LLIMModel::sendStartSession(
return false;
}
-// static
-void LLIMModel::sendSessionInitialized(const LLUUID &session_id)
-{
- LLIMSession* session = getInstance()->findIMSession(session_id);
- if (session)
- {
- LLSD arg;
- arg["session_id"] = session_id;
- getInstance()->mSessionInitializedSignal(arg);
- }
-}
-
//
// Helper Functions
//
@@ -1929,6 +1924,15 @@ BOOL LLIMMgr::getIMReceived() const
return mIMReceived;
}
+void LLIMMgr::autoStartCallOnStartup(const LLUUID& session_id)
+{
+ LLIMModel::LLIMSession *session = LLIMModel::getInstance()->findIMSession(session_id);
+ if (session)
+ {
+ session->mStartCallOnInitialize = true;
+ }
+}
+
LLUUID LLIMMgr::addP2PSession(const std::string& name,
const LLUUID& other_participant_id,
const std::string& voice_session_handle,
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h
index c002434a18..c2288a719a 100644
--- a/indra/newview/llimview.h
+++ b/indra/newview/llimview.h
@@ -105,6 +105,7 @@ public:
bool mTextIMPossible;
bool mOtherParticipantIsAvatar;
+ bool mStartCallOnInitialize;
};
@@ -124,7 +125,6 @@ public:
typedef boost::function<void(const LLSD&)> session_callback_t;
session_signal_t mNewMsgSignal;
session_signal_t mNoUnreadMsgsSignal;
- session_signal_t mSessionInitializedSignal;
/**
* Find an IM Session corresponding to session_id
@@ -139,7 +139,6 @@ public:
boost::signals2::connection addNewMsgCallback( session_callback_t cb ) { return mNewMsgSignal.connect(cb); }
boost::signals2::connection addNoUnreadMsgsCallback( session_callback_t cb ) { return mNoUnreadMsgsSignal.connect(cb); }
- boost::signals2::connection addSessionInitializedCallback(session_callback_t cb ) { return mSessionInitializedSignal.connect(cb); }
/**
* Create new session object in a model
@@ -213,7 +212,6 @@ public:
static bool sendStartSession(const LLUUID& temp_session_id, const LLUUID& other_participant_id,
const std::vector<LLUUID>& ids, EInstantMessage dialog);
static void sendTypingState(LLUUID session_id, LLUUID other_participant_id, BOOL typing);
- static void sendSessionInitialized(const LLUUID &session_id);
static void sendMessage(const std::string& utf8_text, const LLUUID& im_session_id,
const LLUUID& other_participant_id, EInstantMessage dialog);
@@ -330,6 +328,9 @@ public:
void notifyNewIM();
void clearNewIMNotification();
+ // automatically start a call once the session has initialized
+ void autoStartCallOnStartup(const LLUUID& session_id);
+
// IM received that you haven't seen yet
BOOL getIMReceived() const;
diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp
index 8c19865550..4f76d32ad5 100644
--- a/indra/newview/llpanelimcontrolpanel.cpp
+++ b/indra/newview/llpanelimcontrolpanel.cpp
@@ -101,14 +101,6 @@ void LLPanelChatControlPanel::draw()
&& callback_enabled;
childSetEnabled("call_btn", enable_connect);
- // send a signal when the floater is fully initialized
- // this lets LLAvatarActions::startAdhocCall() start the call
- if (enable_connect && !mInitialized)
- {
- LLIMModel::sendSessionInitialized(mSessionId);
- mInitialized = true;
- }
-
LLPanel::draw();
}
diff --git a/indra/newview/llpanelimcontrolpanel.h b/indra/newview/llpanelimcontrolpanel.h
index 871779b273..711340efc7 100644
--- a/indra/newview/llpanelimcontrolpanel.h
+++ b/indra/newview/llpanelimcontrolpanel.h
@@ -45,8 +45,7 @@ class LLPanelChatControlPanel : public LLPanel
{
public:
LLPanelChatControlPanel() :
- mSessionId(LLUUID()),
- mInitialized(false) {};
+ mSessionId(LLUUID()) {};
~LLPanelChatControlPanel();
virtual BOOL postBuild();
@@ -63,7 +62,6 @@ public:
private:
LLUUID mSessionId;
- bool mInitialized;
// connection to voice channel state change signal
boost::signals2::connection mVoiceChannelStateChangeConnection;
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index f3d161ce1e..d8d1760c38 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -369,8 +369,6 @@ bool idle_startup()
LLMemType mt1(LLMemType::MTYPE_STARTUP);
const F32 PRECACHING_DELAY = gSavedSettings.getF32("PrecachingDelay");
- const F32 TIMEOUT_SECONDS = 5.f;
- const S32 MAX_TIMEOUT_COUNT = 3;
static LLTimer timeout;
static S32 timeout_count = 0;
@@ -1438,9 +1436,9 @@ bool idle_startup()
msg->addUUIDFast(_PREHASH_ID, gAgent.getID());
msg->sendReliable(
gFirstSim,
- MAX_TIMEOUT_COUNT,
+ gSavedSettings.getS32("UseCircuitCodeMaxRetries"),
FALSE,
- TIMEOUT_SECONDS,
+ gSavedSettings.getF32("UseCircuitCodeTimeout"),
use_circuit_callback,
NULL);
@@ -2741,6 +2739,9 @@ void LLStartUp::postStartupState()
void reset_login()
{
+ gAgent.cleanup();
+ LLWorld::getInstance()->destroyClass();
+
LLStartUp::setStartupState( STATE_LOGIN_SHOW );
if ( gViewerWindow )
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index ef49d7f057..67007629c0 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -1630,6 +1630,16 @@ S32 LLTextureFetch::update(U32 max_time_ms)
{
sendRequestListToSimulators();
}
+
+ if (!mThreaded)
+ {
+ // Update Curl on same thread as mCurlGetRequest was constructed
+ S32 processed = mCurlGetRequest->process();
+ if (processed > 0)
+ {
+ lldebugs << "processed: " << processed << " messages." << llendl;
+ }
+ }
return res;
}
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index 5c6fc2cf21..118d7f8d08 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -118,6 +118,7 @@ LLWorld::LLWorld() :
void LLWorld::destroyClass()
{
+ mHoleWaterObjects.clear();
gObjectList.destroy();
for(region_list_t::iterator region_it = mRegionList.begin(); region_it != mRegionList.end(); )
{
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 3659db230c..416b1b6973 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -5754,6 +5754,23 @@ You just entered a region using a different server version, which may affect per
The SLurl you clicked on is not supported.
</notification>
+ <notification
+ icon="notifytip.tga"
+ name="BlockedSLURL"
+ priority="high"
+ type="notifytip">
+A SLurl was received from an untrusted browser and has been blocked for your security.
+ </notification>
+
+ <notification
+ icon="notifytip.tga"
+ name="ThrottledSLURL"
+ priority="high"
+ type="notifytip">
+Multiple SLurls were received from an untrusted browser within a short period.
+They will be blocked for a few seconds for your security.
+ </notification>
+
<notification name="IMToast" type="notifytoast">
[MESSAGE]
<form name="form">