aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewerregion.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:02 -0500
committerJacek Antonelli2008-08-15 23:45:02 -0500
commitd644fc64407dcd14ffcee6a0e9fbe28ee3a4e9bd (patch)
tree7ed0c2c27d717801238a2e6b5749cd5bf88c3059 /linden/indra/newview/llviewerregion.cpp
parentSecond Life viewer sources 1.17.3.0 (diff)
downloadmeta-impy-d644fc64407dcd14ffcee6a0e9fbe28ee3a4e9bd.zip
meta-impy-d644fc64407dcd14ffcee6a0e9fbe28ee3a4e9bd.tar.gz
meta-impy-d644fc64407dcd14ffcee6a0e9fbe28ee3a4e9bd.tar.bz2
meta-impy-d644fc64407dcd14ffcee6a0e9fbe28ee3a4e9bd.tar.xz
Second Life viewer sources 1.18.0.6
Diffstat (limited to 'linden/indra/newview/llviewerregion.cpp')
-rw-r--r--linden/indra/newview/llviewerregion.cpp36
1 files changed, 26 insertions, 10 deletions
diff --git a/linden/indra/newview/llviewerregion.cpp b/linden/indra/newview/llviewerregion.cpp
index 9e05d4f..0f20fd8 100644
--- a/linden/indra/newview/llviewerregion.cpp
+++ b/linden/indra/newview/llviewerregion.cpp
@@ -51,6 +51,7 @@
51#include "llfloaterregioninfo.h" 51#include "llfloaterregioninfo.h"
52#include "llhttpnode.h" 52#include "llhttpnode.h"
53#include "llnetmap.h" 53#include "llnetmap.h"
54#include "llstartup.h"
54#include "llviewerobjectlist.h" 55#include "llviewerobjectlist.h"
55#include "llviewerparceloverlay.h" 56#include "llviewerparceloverlay.h"
56#include "llvlmanager.h" 57#include "llvlmanager.h"
@@ -1176,6 +1177,10 @@ void LLViewerRegion::unpackRegionHandshake()
1176 setBillableFactor(billable_factor); 1177 setBillableFactor(billable_factor);
1177 setCacheID(cache_id); 1178 setCacheID(cache_id);
1178 1179
1180 LLUUID region_id;
1181 msg->getUUID("RegionInfo2", "RegionID", region_id);
1182 setRegionID(region_id);
1183
1179 LLVLComposition *compp = getComposition(); 1184 LLVLComposition *compp = getComposition();
1180 if (compp) 1185 if (compp)
1181 { 1186 {
@@ -1252,6 +1257,11 @@ public:
1252 { 1257 {
1253 llinfos << "BaseCapabilitiesComplete::error " 1258 llinfos << "BaseCapabilitiesComplete::error "
1254 << statusNum << ": " << reason << llendl; 1259 << statusNum << ": " << reason << llendl;
1260
1261 if (STATE_SEED_GRANTED_WAIT == gStartupState)
1262 {
1263 gStartupState = STATE_SEED_CAP_GRANTED;
1264 }
1255 } 1265 }
1256 1266
1257 void result(const LLSD& content) 1267 void result(const LLSD& content)
@@ -1263,6 +1273,11 @@ public:
1263 llinfos << "BaseCapabilitiesComplete::result got capability for " 1273 llinfos << "BaseCapabilitiesComplete::result got capability for "
1264 << iter->first << llendl; 1274 << iter->first << llendl;
1265 } 1275 }
1276
1277 if (STATE_SEED_GRANTED_WAIT == gStartupState)
1278 {
1279 gStartupState = STATE_SEED_CAP_GRANTED;
1280 }
1266 } 1281 }
1267 1282
1268 static boost::intrusive_ptr<BaseCapabilitiesComplete> build( 1283 static boost::intrusive_ptr<BaseCapabilitiesComplete> build(
@@ -1279,6 +1294,11 @@ private:
1279 1294
1280void LLViewerRegion::setSeedCapability(const std::string& url) 1295void LLViewerRegion::setSeedCapability(const std::string& url)
1281{ 1296{
1297 if (getCapability("Seed") == url)
1298 {
1299 llwarns << "Ignoring duplicate seed capability" << llendl;
1300 return;
1301 }
1282 delete mEventPoll; 1302 delete mEventPoll;
1283 mEventPoll = NULL; 1303 mEventPoll = NULL;
1284 1304
@@ -1306,23 +1326,18 @@ void LLViewerRegion::setSeedCapability(const std::string& url)
1306 capabilityNames.append("ParcelVoiceInfoRequest"); 1326 capabilityNames.append("ParcelVoiceInfoRequest");
1307 capabilityNames.append("ChatSessionRequest"); 1327 capabilityNames.append("ChatSessionRequest");
1308 1328
1329 llinfos << "posting to seed " << url << llendl;
1330
1309 LLHTTPClient::post(url, capabilityNames, BaseCapabilitiesComplete::build(this)); 1331 LLHTTPClient::post(url, capabilityNames, BaseCapabilitiesComplete::build(this));
1310} 1332}
1311 1333
1312static
1313LLEventPoll* createViewerEventPoll(const std::string& url)
1314{
1315 return new LLEventPoll(url);
1316}
1317
1318
1319void LLViewerRegion::setCapability(const std::string& name, const std::string& url) 1334void LLViewerRegion::setCapability(const std::string& name, const std::string& url)
1320{ 1335{
1321 if(name == "EventQueueGet") 1336 if(name == "EventQueueGet")
1322 { 1337 {
1323 delete mEventPoll; 1338 delete mEventPoll;
1324 mEventPoll = NULL; 1339 mEventPoll = NULL;
1325 mEventPoll = createViewerEventPoll(url); 1340 mEventPoll = new LLEventPoll(url, getHost());
1326 } 1341 }
1327 else if(name == "UntrustedSimulatorMessage") 1342 else if(name == "UntrustedSimulatorMessage")
1328 { 1343 {
@@ -1346,14 +1361,15 @@ std::string LLViewerRegion::getCapability(const std::string& name) const
1346 1361
1347void LLViewerRegion::logActiveCapabilities() const 1362void LLViewerRegion::logActiveCapabilities() const
1348{ 1363{
1364 int count = 0;
1349 CapabilityMap::const_iterator iter; 1365 CapabilityMap::const_iterator iter;
1350 for (iter = mCapabilities.begin(); iter != mCapabilities.end(); iter++) 1366 for (iter = mCapabilities.begin(); iter != mCapabilities.end(); iter++, count++)
1351 { 1367 {
1352 if (!iter->second.empty()) 1368 if (!iter->second.empty())
1353 { 1369 {
1354 // llinfos << "Active capability is " << iter->first << llendl;
1355 llinfos << iter->first << " URL is " << iter->second << llendl; 1370 llinfos << iter->first << " URL is " << iter->second << llendl;
1356 } 1371 }
1357 } 1372 }
1373 llinfos << "Dumped " << count << " entries." << llendl;
1358} 1374}
1359 1375