summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerregion.cpp
diff options
context:
space:
mode:
authorTess Chu <tess@lindenlab.com>2007-07-11 21:29:02 +0000
committerTess Chu <tess@lindenlab.com>2007-07-11 21:29:02 +0000
commit57b8fef824b6d7f37c5be5812ebffa39ab2e8093 (patch)
treef89014544fc276b283a36eb2e0cb52e93806a44a /indra/newview/llviewerregion.cpp
parenta6769f262ff910949a7e1c81cf98e52ddfc2d44a (diff)
svn merge --ignore-ancestry svn+ssh://svn/svn/linden/release@65088 svn+ssh://svn/svn/linden/branches/release-candidate@65078 -> release Paired by Tess and rdw.
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
-rw-r--r--indra/newview/llviewerregion.cpp36
1 files changed, 26 insertions, 10 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 6fd31f3e72..7fed7ebe94 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -31,6 +31,7 @@
#include "llfloaterregioninfo.h"
#include "llhttpnode.h"
#include "llnetmap.h"
+#include "llstartup.h"
#include "llviewerobjectlist.h"
#include "llviewerparceloverlay.h"
#include "llvlmanager.h"
@@ -1156,6 +1157,10 @@ void LLViewerRegion::unpackRegionHandshake()
setBillableFactor(billable_factor);
setCacheID(cache_id);
+ LLUUID region_id;
+ msg->getUUID("RegionInfo2", "RegionID", region_id);
+ setRegionID(region_id);
+
LLVLComposition *compp = getComposition();
if (compp)
{
@@ -1232,6 +1237,11 @@ public:
{
llinfos << "BaseCapabilitiesComplete::error "
<< statusNum << ": " << reason << llendl;
+
+ if (STATE_SEED_GRANTED_WAIT == gStartupState)
+ {
+ gStartupState = STATE_SEED_CAP_GRANTED;
+ }
}
void result(const LLSD& content)
@@ -1243,6 +1253,11 @@ public:
llinfos << "BaseCapabilitiesComplete::result got capability for "
<< iter->first << llendl;
}
+
+ if (STATE_SEED_GRANTED_WAIT == gStartupState)
+ {
+ gStartupState = STATE_SEED_CAP_GRANTED;
+ }
}
static boost::intrusive_ptr<BaseCapabilitiesComplete> build(
@@ -1259,6 +1274,11 @@ private:
void LLViewerRegion::setSeedCapability(const std::string& url)
{
+ if (getCapability("Seed") == url)
+ {
+ llwarns << "Ignoring duplicate seed capability" << llendl;
+ return;
+ }
delete mEventPoll;
mEventPoll = NULL;
@@ -1286,23 +1306,18 @@ void LLViewerRegion::setSeedCapability(const std::string& url)
capabilityNames.append("ParcelVoiceInfoRequest");
capabilityNames.append("ChatSessionRequest");
+ llinfos << "posting to seed " << url << llendl;
+
LLHTTPClient::post(url, capabilityNames, BaseCapabilitiesComplete::build(this));
}
-static
-LLEventPoll* createViewerEventPoll(const std::string& url)
-{
- return new LLEventPoll(url);
-}
-
-
void LLViewerRegion::setCapability(const std::string& name, const std::string& url)
{
if(name == "EventQueueGet")
{
delete mEventPoll;
mEventPoll = NULL;
- mEventPoll = createViewerEventPoll(url);
+ mEventPoll = new LLEventPoll(url, getHost());
}
else if(name == "UntrustedSimulatorMessage")
{
@@ -1326,14 +1341,15 @@ std::string LLViewerRegion::getCapability(const std::string& name) const
void LLViewerRegion::logActiveCapabilities() const
{
+ int count = 0;
CapabilityMap::const_iterator iter;
- for (iter = mCapabilities.begin(); iter != mCapabilities.end(); iter++)
+ for (iter = mCapabilities.begin(); iter != mCapabilities.end(); iter++, count++)
{
if (!iter->second.empty())
{
- // llinfos << "Active capability is " << iter->first << llendl;
llinfos << iter->first << " URL is " << iter->second << llendl;
}
}
+ llinfos << "Dumped " << count << " entries." << llendl;
}