summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorprep <none@none>2012-01-31 15:13:16 -0500
committerprep <none@none>2012-01-31 15:13:16 -0500
commit9e1479d610af1edd799a790ff18155fbb6ec5c89 (patch)
treef086f457880855cac99059c1868b5dcd40a5185b /indra/newview
parent8f6524d999d5153ff4b89abafb35bc96870d6230 (diff)
parent2c9a68c036eec1d1a021df305bf032d0c78da139 (diff)
merge
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/app_settings/settings.xml22
-rw-r--r--indra/newview/llagentwearablesfetch.cpp6
-rw-r--r--indra/newview/llappviewer.cpp4
-rw-r--r--indra/newview/llfilteredpathfindinglinksets.cpp24
-rw-r--r--indra/newview/llfilteredpathfindinglinksets.h6
-rw-r--r--indra/newview/llfloaterpathfindinglinksets.cpp4
-rw-r--r--indra/newview/llmeshrepository.cpp131
-rw-r--r--indra/newview/llmeshrepository.h4
-rw-r--r--indra/newview/llpathfindinglinkset.cpp158
-rw-r--r--indra/newview/llpathfindinglinkset.h4
-rw-r--r--indra/newview/llviewerwindow.cpp11
-rw-r--r--indra/newview/llxmlrpctransaction.cpp19
12 files changed, 253 insertions, 140 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 28ba9fd704..ea00a0204d 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -1828,6 +1828,28 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>CurlMaximumNumberOfHandles</key>
+ <map>
+ <key>Comment</key>
+ <string>Maximum number of handles curl can use (requires restart)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>256</integer>
+ </map>
+ <key>CurlRequestTimeOut</key>
+ <map>
+ <key>Comment</key>
+ <string>Max idle time of a curl request before killed (requires restart)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>120.0</real>
+ </map>
<key>CurlUseMultipleThreads</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llagentwearablesfetch.cpp b/indra/newview/llagentwearablesfetch.cpp
index 1edc96e165..4097ff707c 100644
--- a/indra/newview/llagentwearablesfetch.cpp
+++ b/indra/newview/llagentwearablesfetch.cpp
@@ -111,6 +111,12 @@ void LLInitialWearablesFetch::add(InitialWearableData &data)
void LLInitialWearablesFetch::processContents()
{
+ if(!gAgentAvatarp) //no need to process wearables if the agent avatar is deleted.
+ {
+ delete this;
+ return ;
+ }
+
// Fetch the wearable items from the Current Outfit Folder
LLInventoryModel::cat_array_t cat_array;
LLInventoryModel::item_array_t wearable_array;
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 172eb834b4..261553599b 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -723,7 +723,9 @@ bool LLAppViewer::init()
// *NOTE:Mani - LLCurl::initClass is not thread safe.
// Called before threads are created.
- LLCurl::initClass(gSavedSettings.getBOOL("CurlUseMultipleThreads"));
+ LLCurl::initClass(gSavedSettings.getF32("CurlRequestTimeOut"),
+ gSavedSettings.getS32("CurlMaximumNumberOfHandles"),
+ gSavedSettings.getBOOL("CurlUseMultipleThreads"));
LL_INFOS("InitInfo") << "LLCurl initialized." << LL_ENDL ;
LLMachineID::init();
diff --git a/indra/newview/llfilteredpathfindinglinksets.cpp b/indra/newview/llfilteredpathfindinglinksets.cpp
index c956a5752b..aaff2bcc68 100644
--- a/indra/newview/llfilteredpathfindinglinksets.cpp
+++ b/indra/newview/llfilteredpathfindinglinksets.cpp
@@ -122,7 +122,7 @@ LLFilteredPathfindingLinksets::LLFilteredPathfindingLinksets()
{
}
-LLFilteredPathfindingLinksets::LLFilteredPathfindingLinksets(const LLSD& pNavMeshData)
+LLFilteredPathfindingLinksets::LLFilteredPathfindingLinksets(const LLSD& pLinksetItems)
: mAllLinksets(),
mFilteredLinksets(),
mIsFiltersDirty(false),
@@ -132,7 +132,7 @@ LLFilteredPathfindingLinksets::LLFilteredPathfindingLinksets(const LLSD& pNavMes
mIsObstacleFilter(true),
mIsIgnoredFilter(true)
{
- setPathfindingLinksets(pNavMeshData);
+ setPathfindingLinksets(pLinksetItems);
}
LLFilteredPathfindingLinksets::LLFilteredPathfindingLinksets(const LLFilteredPathfindingLinksets& pOther)
@@ -152,15 +152,15 @@ LLFilteredPathfindingLinksets::~LLFilteredPathfindingLinksets()
clearPathfindingLinksets();
}
-void LLFilteredPathfindingLinksets::setPathfindingLinksets(const LLSD& pNavMeshData)
+void LLFilteredPathfindingLinksets::setPathfindingLinksets(const LLSD& pLinksetItems)
{
clearPathfindingLinksets();
- for (LLSD::map_const_iterator navMeshDataIter = pNavMeshData.beginMap();
- navMeshDataIter != pNavMeshData.endMap(); ++navMeshDataIter)
+ for (LLSD::map_const_iterator linksetItemIter = pLinksetItems.beginMap();
+ linksetItemIter != pLinksetItems.endMap(); ++linksetItemIter)
{
- const std::string& uuid(navMeshDataIter->first);
- const LLSD& linksetData = navMeshDataIter->second;
+ const std::string& uuid(linksetItemIter->first);
+ const LLSD& linksetData = linksetItemIter->second;
LLPathfindingLinkset linkset(uuid, linksetData);
mAllLinksets.insert(std::pair<std::string, LLPathfindingLinkset>(uuid, linkset));
@@ -169,13 +169,13 @@ void LLFilteredPathfindingLinksets::setPathfindingLinksets(const LLSD& pNavMeshD
mIsFiltersDirty = true;
}
-void LLFilteredPathfindingLinksets::updatePathfindingLinksets(const LLSD& pNavMeshData)
+void LLFilteredPathfindingLinksets::updatePathfindingLinksets(const LLSD& pLinksetItems)
{
- for (LLSD::map_const_iterator navMeshDataIter = pNavMeshData.beginMap();
- navMeshDataIter != pNavMeshData.endMap(); ++navMeshDataIter)
+ for (LLSD::map_const_iterator linksetItemIter = pLinksetItems.beginMap();
+ linksetItemIter != pLinksetItems.endMap(); ++linksetItemIter)
{
- const std::string& uuid(navMeshDataIter->first);
- const LLSD& linksetData = navMeshDataIter->second;
+ const std::string& uuid(linksetItemIter->first);
+ const LLSD& linksetData = linksetItemIter->second;
LLPathfindingLinkset linkset(uuid, linksetData);
PathfindingLinksetMap::iterator linksetIter = mAllLinksets.find(uuid);
diff --git a/indra/newview/llfilteredpathfindinglinksets.h b/indra/newview/llfilteredpathfindinglinksets.h
index afd2b2b01d..de9b3a5e15 100644
--- a/indra/newview/llfilteredpathfindinglinksets.h
+++ b/indra/newview/llfilteredpathfindinglinksets.h
@@ -61,12 +61,12 @@ public:
typedef std::map<std::string, LLPathfindingLinkset> PathfindingLinksetMap;
LLFilteredPathfindingLinksets();
- LLFilteredPathfindingLinksets(const LLSD& pNavMeshData);
+ LLFilteredPathfindingLinksets(const LLSD& pLinksetItems);
LLFilteredPathfindingLinksets(const LLFilteredPathfindingLinksets& pOther);
virtual ~LLFilteredPathfindingLinksets();
- void setPathfindingLinksets(const LLSD& pNavMeshData);
- void updatePathfindingLinksets(const LLSD& pNavMeshData);
+ void setPathfindingLinksets(const LLSD& pLinksetItems);
+ void updatePathfindingLinksets(const LLSD& pLinksetItems);
void clearPathfindingLinksets();
const PathfindingLinksetMap& getAllLinksets() const;
diff --git a/indra/newview/llfloaterpathfindinglinksets.cpp b/indra/newview/llfloaterpathfindinglinksets.cpp
index 571c4a8427..4d3581fc60 100644
--- a/indra/newview/llfloaterpathfindinglinksets.cpp
+++ b/indra/newview/llfloaterpathfindinglinksets.cpp
@@ -372,6 +372,7 @@ void LLFloaterPathfindingLinksets::setMessagingState(EMessagingState pMessagingS
{
mMessagingState = pMessagingState;
updateLinksetsStatusMessage();
+ updateEditFields();
}
void LLFloaterPathfindingLinksets::onApplyFiltersClicked()
@@ -524,6 +525,7 @@ void LLFloaterPathfindingLinksets::updateLinksetsList()
mLinksetsScrollList->selectMultiple(selectedUUIDs);
updateLinksetsStatusMessage();
+ updateEditFields();
}
void LLFloaterPathfindingLinksets::selectAllLinksets()
@@ -670,7 +672,7 @@ void LLFloaterPathfindingLinksets::applyEditFields()
const LLFilteredPathfindingLinksets::PathfindingLinksetMap::const_iterator linksetIter = linksetsMap.find(uuid.asString());
const LLPathfindingLinkset &linkset = linksetIter->second;
- LLSD itemData = linkset.getAlteredFields(pathState, aValue, bValue, cValue, dValue, isPhantom);
+ LLSD itemData = linkset.encodeAlteredFields(pathState, aValue, bValue, cValue, dValue, isPhantom);
if (!itemData.isUndefined())
{
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index a97e256c89..c64479f589 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -498,9 +498,11 @@ void LLMeshRepoThread::run()
LODRequest req = mLODReqQ.front();
mLODReqQ.pop();
mMutex->unlock();
- if (fetchMeshLOD(req.mMeshParams, req.mLOD))
+ if (!fetchMeshLOD(req.mMeshParams, req.mLOD, count))//failed, resubmit
{
- count++;
+ mMutex->lock();
+ mLODReqQ.push(req) ;
+ mMutex->unlock();
}
}
}
@@ -512,9 +514,11 @@ void LLMeshRepoThread::run()
HeaderRequest req = mHeaderReqQ.front();
mHeaderReqQ.pop();
mMutex->unlock();
- if (fetchMeshHeader(req.mMeshParams))
+ if (!fetchMeshHeader(req.mMeshParams, count))//failed, resubmit
{
- count++;
+ mMutex->lock();
+ mHeaderReqQ.push(req) ;
+ mMutex->unlock();
}
}
}
@@ -658,6 +662,7 @@ bool LLMeshRepoThread::fetchMeshSkinInfo(const LLUUID& mesh_id)
return false;
}
+ bool ret = true ;
U32 header_size = mMeshHeaderSize[mesh_id];
if (header_size > 0)
@@ -673,7 +678,7 @@ bool LLMeshRepoThread::fetchMeshSkinInfo(const LLUUID& mesh_id)
//check VFS for mesh skin info
LLVFile file(gVFS, mesh_id, LLAssetType::AT_MESH);
if (file.getSize() >= offset+size)
- {
+ {
LLMeshRepository::sCacheBytesRead += size;
file.seek(offset);
U8* buffer = new U8[size];
@@ -689,7 +694,7 @@ bool LLMeshRepoThread::fetchMeshSkinInfo(const LLUUID& mesh_id)
if (!zero)
{ //attempt to parse
if (skinInfoReceived(mesh_id, buffer, size))
- {
+ {
delete[] buffer;
return true;
}
@@ -704,11 +709,14 @@ bool LLMeshRepoThread::fetchMeshSkinInfo(const LLUUID& mesh_id)
std::string http_url = constructUrl(mesh_id);
if (!http_url.empty())
- {
- ++sActiveLODRequests;
- LLMeshRepository::sHTTPRequestCount++;
- mCurlRequest->getByteRange(constructUrl(mesh_id), headers, offset, size,
+ {
+ ret = mCurlRequest->getByteRange(http_url, headers, offset, size,
new LLMeshSkinInfoResponder(mesh_id, offset, size));
+ if(ret)
+ {
+ ++sActiveLODRequests;
+ LLMeshRepository::sHTTPRequestCount++;
+ }
}
}
}
@@ -718,7 +726,7 @@ bool LLMeshRepoThread::fetchMeshSkinInfo(const LLUUID& mesh_id)
}
//early out was not hit, effectively fetched
- return true;
+ return ret;
}
bool LLMeshRepoThread::fetchMeshDecomposition(const LLUUID& mesh_id)
@@ -732,7 +740,8 @@ bool LLMeshRepoThread::fetchMeshDecomposition(const LLUUID& mesh_id)
}
U32 header_size = mMeshHeaderSize[mesh_id];
-
+ bool ret = true ;
+
if (header_size > 0)
{
S32 version = mMeshHeader[mesh_id]["version"].asInteger();
@@ -748,6 +757,7 @@ bool LLMeshRepoThread::fetchMeshDecomposition(const LLUUID& mesh_id)
if (file.getSize() >= offset+size)
{
LLMeshRepository::sCacheBytesRead += size;
+
file.seek(offset);
U8* buffer = new U8[size];
file.read(buffer, size);
@@ -777,11 +787,14 @@ bool LLMeshRepoThread::fetchMeshDecomposition(const LLUUID& mesh_id)
std::string http_url = constructUrl(mesh_id);
if (!http_url.empty())
- {
- ++sActiveLODRequests;
- LLMeshRepository::sHTTPRequestCount++;
- mCurlRequest->getByteRange(http_url, headers, offset, size,
+ {
+ ret = mCurlRequest->getByteRange(http_url, headers, offset, size,
new LLMeshDecompositionResponder(mesh_id, offset, size));
+ if(ret)
+ {
+ ++sActiveLODRequests;
+ LLMeshRepository::sHTTPRequestCount++;
+ }
}
}
}
@@ -791,7 +804,7 @@ bool LLMeshRepoThread::fetchMeshDecomposition(const LLUUID& mesh_id)
}
//early out was not hit, effectively fetched
- return true;
+ return ret;
}
bool LLMeshRepoThread::fetchMeshPhysicsShape(const LLUUID& mesh_id)
@@ -805,6 +818,7 @@ bool LLMeshRepoThread::fetchMeshPhysicsShape(const LLUUID& mesh_id)
}
U32 header_size = mMeshHeaderSize[mesh_id];
+ bool ret = true ;
if (header_size > 0)
{
@@ -850,11 +864,15 @@ bool LLMeshRepoThread::fetchMeshPhysicsShape(const LLUUID& mesh_id)
std::string http_url = constructUrl(mesh_id);
if (!http_url.empty())
- {
- ++sActiveLODRequests;
- LLMeshRepository::sHTTPRequestCount++;
- mCurlRequest->getByteRange(http_url, headers, offset, size,
+ {
+ ret = mCurlRequest->getByteRange(http_url, headers, offset, size,
new LLMeshPhysicsShapeResponder(mesh_id, offset, size));
+
+ if(ret)
+ {
+ ++sActiveLODRequests;
+ LLMeshRepository::sHTTPRequestCount++;
+ }
}
}
else
@@ -868,13 +886,12 @@ bool LLMeshRepoThread::fetchMeshPhysicsShape(const LLUUID& mesh_id)
}
//early out was not hit, effectively fetched
- return true;
+ return ret;
}
-bool LLMeshRepoThread::fetchMeshHeader(const LLVolumeParams& mesh_params)
+//return false if failed to get header
+bool LLMeshRepoThread::fetchMeshHeader(const LLVolumeParams& mesh_params, U32& count)
{
- bool retval = false;
-
{
//look for mesh in asset in vfs
LLVFile file(gVFS, mesh_params.getSculptID(), LLAssetType::AT_MESH);
@@ -889,36 +906,40 @@ bool LLMeshRepoThread::fetchMeshHeader(const LLVolumeParams& mesh_params)
file.read(buffer, bytes);
if (headerReceived(mesh_params, buffer, bytes))
{ //did not do an HTTP request, return false
- return false;
+ return true;
}
}
}
- //either cache entry doesn't exist or is corrupt, request header from simulator
-
+ //either cache entry doesn't exist or is corrupt, request header from simulator
+ bool retval = true ;
std::vector<std::string> headers;
headers.push_back("Accept: application/octet-stream");
std::string http_url = constructUrl(mesh_params.getSculptID());
if (!http_url.empty())
{
- ++sActiveHeaderRequests;
- retval = true;
//grab first 4KB if we're going to bother with a fetch. Cache will prevent future fetches if a full mesh fits
//within the first 4KB
- //NOTE -- this will break of headers ever exceed 4KB
- LLMeshRepository::sHTTPRequestCount++;
- mCurlRequest->getByteRange(http_url, headers, 0, 4096, new LLMeshHeaderResponder(mesh_params));
+ //NOTE -- this will break of headers ever exceed 4KB
+ retval = mCurlRequest->getByteRange(http_url, headers, 0, 4096, new LLMeshHeaderResponder(mesh_params));
+ if(retval)
+ {
+ ++sActiveHeaderRequests;
+ LLMeshRepository::sHTTPRequestCount++;
+ }
+ count++;
}
return retval;
}
-bool LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod)
+//return false if failed to get mesh lod.
+bool LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod, U32& count)
{ //protected by mMutex
mHeaderMutex->lock();
- bool retval = false;
+ bool retval = true;
LLUUID mesh_id = mesh_params.getSculptID();
@@ -955,7 +976,7 @@ bool LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod)
if (lodReceived(mesh_params, lod, buffer, size))
{
delete[] buffer;
- return false;
+ return true;
}
}
@@ -968,12 +989,16 @@ bool LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod)
std::string http_url = constructUrl(mesh_id);
if (!http_url.empty())
- {
- ++sActiveLODRequests;
- retval = true;
- LLMeshRepository::sHTTPRequestCount++;
- mCurlRequest->getByteRange(constructUrl(mesh_id), headers, offset, size,
+ {
+ retval = mCurlRequest->getByteRange(constructUrl(mesh_id), headers, offset, size,
new LLMeshLODResponder(mesh_params, lod, offset, size));
+
+ if(retval)
+ {
+ ++sActiveLODRequests;
+ LLMeshRepository::sHTTPRequestCount++;
+ }
+ count++;
}
else
{
@@ -1540,8 +1565,17 @@ void LLMeshUploadThread::doWholeModelUpload()
LLSD body = full_model_data["asset_resources"];
dump_llsd_to_file(body,make_dump_name("whole_model_body_",dump_num));
LLCurlRequest::headers_t headers;
- mCurlRequest->post(mWholeModelUploadURL, headers, body,
- new LLWholeModelUploadResponder(this, full_model_data, mUploadObserverHandle), mMeshUploadTimeOut);
+
+ {
+ LLCurl::ResponderPtr responder = new LLWholeModelUploadResponder(this, full_model_data, mUploadObserverHandle) ;
+
+ while(!mCurlRequest->post(mWholeModelUploadURL, headers, body, responder, mMeshUploadTimeOut))
+ {
+ //sleep for 10ms to prevent eating a whole core
+ apr_sleep(10000);
+ }
+ }
+
do
{
mCurlRequest->process();
@@ -1571,8 +1605,15 @@ void LLMeshUploadThread::requestWholeModelFee()
mPendingUploads++;
LLCurlRequest::headers_t headers;
- mCurlRequest->post(mWholeModelFeeCapability, headers, model_data,
- new LLWholeModelFeeResponder(this,model_data, mFeeObserverHandle), mMeshUploadTimeOut);
+
+ {
+ LLCurl::ResponderPtr responder = new LLWholeModelFeeResponder(this,model_data, mFeeObserverHandle) ;
+ while(!mCurlRequest->post(mWholeModelFeeCapability, headers, model_data, responder, mMeshUploadTimeOut))
+ {
+ //sleep for 10ms to prevent eating a whole core
+ apr_sleep(10000);
+ }
+ }
do
{
diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h
index 27e8aef57c..1b7954d4bd 100644
--- a/indra/newview/llmeshrepository.h
+++ b/indra/newview/llmeshrepository.h
@@ -323,8 +323,8 @@ public:
virtual void run();
void loadMeshLOD(const LLVolumeParams& mesh_params, S32 lod);
- bool fetchMeshHeader(const LLVolumeParams& mesh_params);
- bool fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod);
+ bool fetchMeshHeader(const LLVolumeParams& mesh_params, U32& count);
+ bool fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod, U32& count);
bool headerReceived(const LLVolumeParams& mesh_params, U8* data, S32 data_size);
bool lodReceived(const LLVolumeParams& mesh_params, S32 lod, U8* data, S32 data_size);
bool skinInfoReceived(const LLUUID& mesh_id, U8* data, S32 data_size);
diff --git a/indra/newview/llpathfindinglinkset.cpp b/indra/newview/llpathfindinglinkset.cpp
index bfe851d8ee..daa308f862 100644
--- a/indra/newview/llpathfindinglinkset.cpp
+++ b/indra/newview/llpathfindinglinkset.cpp
@@ -31,6 +31,18 @@
#include "v3math.h"
#include "lluuid.h"
+#define LINKSET_NAME_FIELD "name"
+#define LINKSET_DESCRIPTION_FIELD "description"
+#define LINKSET_LAND_IMPACT_FIELD "landimpact"
+#define LINKSET_PERMANENT_FIELD "permanent"
+#define LINKSET_WALKABLE_FIELD "walkable"
+#define LINKSET_PHANTOM_FIELD "phantom"
+#define LINKSET_WALKABILITY_A_FIELD "A"
+#define LINKSET_WALKABILITY_B_FIELD "B"
+#define LINKSET_WALKABILITY_C_FIELD "C"
+#define LINKSET_WALKABILITY_D_FIELD "D"
+#define LINKSET_POSITION_FIELD "position"
+
//---------------------------------------------------------------------------
// LLPathfindingLinkset
//---------------------------------------------------------------------------
@@ -38,7 +50,7 @@
const S32 LLPathfindingLinkset::MIN_WALKABILITY_VALUE(0);
const S32 LLPathfindingLinkset::MAX_WALKABILITY_VALUE(100);
-LLPathfindingLinkset::LLPathfindingLinkset(const std::string &pUUID, const LLSD& pNavMeshItem)
+LLPathfindingLinkset::LLPathfindingLinkset(const std::string &pUUID, const LLSD& pLinksetItem)
: mUUID(pUUID),
mName(),
mDescription(),
@@ -54,107 +66,107 @@ LLPathfindingLinkset::LLPathfindingLinkset(const std::string &pUUID, const LLSD&
mWalkabilityCoefficientC(MIN_WALKABILITY_VALUE),
mWalkabilityCoefficientD(MIN_WALKABILITY_VALUE)
{
- llassert(pNavMeshItem.has("name"));
- llassert(pNavMeshItem.get("name").isString());
- mName = pNavMeshItem.get("name").asString();
+ llassert(pLinksetItem.has(LINKSET_NAME_FIELD));
+ llassert(pLinksetItem.get(LINKSET_NAME_FIELD).isString());
+ mName = pLinksetItem.get(LINKSET_NAME_FIELD).asString();
- llassert(pNavMeshItem.has("description"));
- llassert(pNavMeshItem.get("description").isString());
- mDescription = pNavMeshItem.get("description").asString();
+ llassert(pLinksetItem.has(LINKSET_DESCRIPTION_FIELD));
+ llassert(pLinksetItem.get(LINKSET_DESCRIPTION_FIELD).isString());
+ mDescription = pLinksetItem.get(LINKSET_DESCRIPTION_FIELD).asString();
- llassert(pNavMeshItem.has("landimpact"));
- llassert(pNavMeshItem.get("landimpact").isInteger());
- llassert(pNavMeshItem.get("landimpact").asInteger() >= 0);
- mLandImpact = pNavMeshItem.get("landimpact").asInteger();
+ llassert(pLinksetItem.has(LINKSET_LAND_IMPACT_FIELD));
+ llassert(pLinksetItem.get(LINKSET_LAND_IMPACT_FIELD).isInteger());
+ llassert(pLinksetItem.get(LINKSET_LAND_IMPACT_FIELD).asInteger() >= 0);
+ mLandImpact = pLinksetItem.get(LINKSET_LAND_IMPACT_FIELD).asInteger();
- llassert(pNavMeshItem.has("permanent"));
- llassert(pNavMeshItem.get("permanent").isBoolean());
- bool isPermanent = pNavMeshItem.get("permanent").asBoolean();
+ llassert(pLinksetItem.has(LINKSET_PERMANENT_FIELD));
+ llassert(pLinksetItem.get(LINKSET_PERMANENT_FIELD).isBoolean());
+ bool isPermanent = pLinksetItem.get(LINKSET_PERMANENT_FIELD).asBoolean();
- llassert(pNavMeshItem.has("walkable"));
- llassert(pNavMeshItem.get("walkable").isBoolean());
- bool isWalkable = pNavMeshItem.get("walkable").asBoolean();
+ llassert(pLinksetItem.has(LINKSET_WALKABLE_FIELD));
+ llassert(pLinksetItem.get(LINKSET_WALKABLE_FIELD).isBoolean());
+ bool isWalkable = pLinksetItem.get(LINKSET_WALKABLE_FIELD).asBoolean();
mPathState = getPathState(isPermanent, isWalkable);
- llassert(pNavMeshItem.has("phantom"));
- llassert(pNavMeshItem.get("phantom").isBoolean());
- mIsPhantom = pNavMeshItem.get("phantom").asBoolean();
+ llassert(pLinksetItem.has(LINKSET_PHANTOM_FIELD));
+ llassert(pLinksetItem.get(LINKSET_PHANTOM_FIELD).isBoolean());
+ mIsPhantom = pLinksetItem.get(LINKSET_PHANTOM_FIELD).asBoolean();
- llassert(pNavMeshItem.has("A"));
+ llassert(pLinksetItem.has(LINKSET_WALKABILITY_A_FIELD));
#ifdef XXX_STINSON_WALKABILITY_COEFFICIENTS_TYPE_CHANGE
- mIsWalkabilityCoefficientsF32 = pNavMeshItem.get("A").isReal();
+ mIsWalkabilityCoefficientsF32 = pLinksetItem.get(LINKSET_WALKABILITY_A_FIELD).isReal();
if (mIsWalkabilityCoefficientsF32)
{
// Old server-side storage was real
- mWalkabilityCoefficientA = llround(pNavMeshItem.get("A").asReal() * 100.0f);
+ mWalkabilityCoefficientA = llround(pLinksetItem.get(LINKSET_WALKABILITY_A_FIELD).asReal() * 100.0f);
- llassert(pNavMeshItem.has("B"));
- llassert(pNavMeshItem.get("B").isReal());
- mWalkabilityCoefficientB = llround(pNavMeshItem.get("B").asReal() * 100.0f);
+ llassert(pLinksetItem.has(LINKSET_WALKABILITY_B_FIELD));
+ llassert(pLinksetItem.get(LINKSET_WALKABILITY_B_FIELD).isReal());
+ mWalkabilityCoefficientB = llround(pLinksetItem.get(LINKSET_WALKABILITY_B_FIELD).asReal() * 100.0f);
- llassert(pNavMeshItem.has("C"));
- llassert(pNavMeshItem.get("C").isReal());
- mWalkabilityCoefficientC = llround(pNavMeshItem.get("C").asReal() * 100.0f);
+ llassert(pLinksetItem.has(LINKSET_WALKABILITY_C_FIELD));
+ llassert(pLinksetItem.get(LINKSET_WALKABILITY_C_FIELD).isReal());
+ mWalkabilityCoefficientC = llround(pLinksetItem.get(LINKSET_WALKABILITY_C_FIELD).asReal() * 100.0f);
- llassert(pNavMeshItem.has("D"));
- llassert(pNavMeshItem.get("D").isReal());
- mWalkabilityCoefficientD = llround(pNavMeshItem.get("D").asReal() * 100.0f);
+ llassert(pLinksetItem.has(LINKSET_WALKABILITY_D_FIELD));
+ llassert(pLinksetItem.get(LINKSET_WALKABILITY_D_FIELD).isReal());
+ mWalkabilityCoefficientD = llround(pLinksetItem.get(LINKSET_WALKABILITY_D_FIELD).asReal() * 100.0f);
}
else
{
// New server-side storage will be integer
- llassert(pNavMeshItem.get("A").isInteger());
- mWalkabilityCoefficientA = pNavMeshItem.get("A").asInteger();
+ llassert(pLinksetItem.get(LINKSET_WALKABILITY_A_FIELD).isInteger());
+ mWalkabilityCoefficientA = pLinksetItem.get(LINKSET_WALKABILITY_A_FIELD).asInteger();
llassert(mWalkabilityCoefficientA >= MIN_WALKABILITY_VALUE);
llassert(mWalkabilityCoefficientA <= MAX_WALKABILITY_VALUE);
- llassert(pNavMeshItem.has("B"));
- llassert(pNavMeshItem.get("B").isInteger());
- mWalkabilityCoefficientB = pNavMeshItem.get("B").asInteger();
+ llassert(pLinksetItem.has(LINKSET_WALKABILITY_B_FIELD));
+ llassert(pLinksetItem.get(LINKSET_WALKABILITY_B_FIELD).isInteger());
+ mWalkabilityCoefficientB = pLinksetItem.get(LINKSET_WALKABILITY_B_FIELD).asInteger();
llassert(mWalkabilityCoefficientB >= MIN_WALKABILITY_VALUE);
llassert(mWalkabilityCoefficientB <= MAX_WALKABILITY_VALUE);
- llassert(pNavMeshItem.has("C"));
- llassert(pNavMeshItem.get("C").isInteger());
- mWalkabilityCoefficientC = pNavMeshItem.get("C").asInteger();
+ llassert(pLinksetItem.has(LINKSET_WALKABILITY_C_FIELD));
+ llassert(pLinksetItem.get(LINKSET_WALKABILITY_C_FIELD).isInteger());
+ mWalkabilityCoefficientC = pLinksetItem.get(LINKSET_WALKABILITY_C_FIELD).asInteger();
llassert(mWalkabilityCoefficientC >= MIN_WALKABILITY_VALUE);
llassert(mWalkabilityCoefficientC <= MAX_WALKABILITY_VALUE);
- llassert(pNavMeshItem.has("D"));
- llassert(pNavMeshItem.get("D").isInteger());
- mWalkabilityCoefficientD = pNavMeshItem.get("D").asInteger();
+ llassert(pLinksetItem.has(LINKSET_WALKABILITY_D_FIELD));
+ llassert(pLinksetItem.get(LINKSET_WALKABILITY_D_FIELD).isInteger());
+ mWalkabilityCoefficientD = pLinksetItem.get(LINKSET_WALKABILITY_D_FIELD).asInteger();
llassert(mWalkabilityCoefficientD >= MIN_WALKABILITY_VALUE);
llassert(mWalkabilityCoefficientD <= MAX_WALKABILITY_VALUE);
}
#else // XXX_STINSON_WALKABILITY_COEFFICIENTS_TYPE_CHANGE
- llassert(pNavMeshItem.get("A").isInteger());
- mWalkabilityCoefficientA = pNavMeshItem.get("A").asInteger();
+ llassert(pLinksetItem.get(LINKSET_WALKABILITY_A_FIELD).isInteger());
+ mWalkabilityCoefficientA = pLinksetItem.get(LINKSET_WALKABILITY_A_FIELD).asInteger();
llassert(mWalkabilityCoefficientA >= MIN_WALKABILITY_VALUE);
llassert(mWalkabilityCoefficientA <= MAX_WALKABILITY_VALUE);
- llassert(pNavMeshItem.has("B"));
- llassert(pNavMeshItem.get("B").isInteger());
- mWalkabilityCoefficientB = pNavMeshItem.get("B").asInteger();
+ llassert(pLinksetItem.has(LINKSET_WALKABILITY_B_FIELD));
+ llassert(pLinksetItem.get(LINKSET_WALKABILITY_B_FIELD).isInteger());
+ mWalkabilityCoefficientB = pLinksetItem.get(LINKSET_WALKABILITY_B_FIELD).asInteger();
llassert(mWalkabilityCoefficientB >= MIN_WALKABILITY_VALUE);
llassert(mWalkabilityCoefficientB <= MAX_WALKABILITY_VALUE);
- llassert(pNavMeshItem.has("C"));
- llassert(pNavMeshItem.get("C").isInteger());
- mWalkabilityCoefficientC = pNavMeshItem.get("C").asInteger();
+ llassert(pLinksetItem.has(LINKSET_WALKABILITY_C_FIELD));
+ llassert(pLinksetItem.get(LINKSET_WALKABILITY_C_FIELD).isInteger());
+ mWalkabilityCoefficientC = pLinksetItem.get(LINKSET_WALKABILITY_C_FIELD).asInteger();
llassert(mWalkabilityCoefficientC >= MIN_WALKABILITY_VALUE);
llassert(mWalkabilityCoefficientC <= MAX_WALKABILITY_VALUE);
- llassert(pNavMeshItem.has("D"));
- llassert(pNavMeshItem.get("D").isInteger());
- mWalkabilityCoefficientD = pNavMeshItem.get("D").asInteger();
+ llassert(pLinksetItem.has(LINKSET_WALKABILITY_D_FIELD));
+ llassert(pLinksetItem.get(LINKSET_WALKABILITY_D_FIELD).isInteger());
+ mWalkabilityCoefficientD = pLinksetItem.get(LINKSET_WALKABILITY_D_FIELD).asInteger();
llassert(mWalkabilityCoefficientD >= MIN_WALKABILITY_VALUE);
llassert(mWalkabilityCoefficientD <= MAX_WALKABILITY_VALUE);
#endif // XXX_STINSON_WALKABILITY_COEFFICIENTS_TYPE_CHANGE
- llassert(pNavMeshItem.has("position"));
- llassert(pNavMeshItem.get("position").isArray());
- mLocation.setValue(pNavMeshItem.get("position"));
+ llassert(pLinksetItem.has(LINKSET_POSITION_FIELD));
+ llassert(pLinksetItem.get(LINKSET_POSITION_FIELD).isArray());
+ mLocation.setValue(pLinksetItem.get(LINKSET_POSITION_FIELD));
}
LLPathfindingLinkset::LLPathfindingLinkset(const LLPathfindingLinkset& pOther)
@@ -269,75 +281,75 @@ void LLPathfindingLinkset::setWalkabilityCoefficientD(S32 pD)
mWalkabilityCoefficientD = llclamp(pD, MIN_WALKABILITY_VALUE, MAX_WALKABILITY_VALUE);
}
-LLSD LLPathfindingLinkset::getAlteredFields(EPathState pPathState, S32 pA, S32 pB, S32 pC, S32 pD, BOOL pIsPhantom) const
+LLSD LLPathfindingLinkset::encodeAlteredFields(EPathState pPathState, S32 pA, S32 pB, S32 pC, S32 pD, BOOL pIsPhantom) const
{
LLSD itemData;
if (mPathState != pPathState)
{
- itemData["permanent"] = static_cast<bool>(LLPathfindingLinkset::isPermanent(pPathState));
- itemData["walkable"] = static_cast<bool>(LLPathfindingLinkset::isWalkable(pPathState));
+ itemData[LINKSET_PERMANENT_FIELD] = static_cast<bool>(LLPathfindingLinkset::isPermanent(pPathState));
+ itemData[LINKSET_WALKABLE_FIELD] = static_cast<bool>(LLPathfindingLinkset::isWalkable(pPathState));
}
#ifdef XXX_STINSON_WALKABILITY_COEFFICIENTS_TYPE_CHANGE
if (mIsWalkabilityCoefficientsF32)
{
if (mWalkabilityCoefficientA != pA)
{
- itemData["A"] = llclamp(static_cast<F32>(pA) / 100.0f, 0.0f, 1.0f);
+ itemData[LINKSET_WALKABILITY_A_FIELD] = llclamp(static_cast<F32>(pA) / 100.0f, 0.0f, 1.0f);
}
if (mWalkabilityCoefficientB != pB)
{
- itemData["B"] = llclamp(static_cast<F32>(pB) / 100.0f, 0.0f, 1.0f);
+ itemData[LINKSET_WALKABILITY_B_FIELD] = llclamp(static_cast<F32>(pB) / 100.0f, 0.0f, 1.0f);
}
if (mWalkabilityCoefficientC != pC)
{
- itemData["C"] = llclamp(static_cast<F32>(pC) / 100.0f, 0.0f, 1.0f);
+ itemData[LINKSET_WALKABILITY_C_FIELD] = llclamp(static_cast<F32>(pC) / 100.0f, 0.0f, 1.0f);
}
if (mWalkabilityCoefficientD != pD)
{
- itemData["D"] = llclamp(static_cast<F32>(pD) / 100.0f, 0.0f, 1.0f);
+ itemData[LINKSET_WALKABILITY_D_FIELD] = llclamp(static_cast<F32>(pD) / 100.0f, 0.0f, 1.0f);
}
}
else
{
if (mWalkabilityCoefficientA != pA)
{
- itemData["A"] = llclamp(pA, MIN_WALKABILITY_VALUE, MAX_WALKABILITY_VALUE);
+ itemData[LINKSET_WALKABILITY_A_FIELD] = llclamp(pA, MIN_WALKABILITY_VALUE, MAX_WALKABILITY_VALUE);
}
if (mWalkabilityCoefficientB != pB)
{
- itemData["B"] = llclamp(pB, MIN_WALKABILITY_VALUE, MAX_WALKABILITY_VALUE);
+ itemData[LINKSET_WALKABILITY_B_FIELD] = llclamp(pB, MIN_WALKABILITY_VALUE, MAX_WALKABILITY_VALUE);
}
if (mWalkabilityCoefficientC != pC)
{
- itemData["C"] = llclamp(pC, MIN_WALKABILITY_VALUE, MAX_WALKABILITY_VALUE);
+ itemData[LINKSET_WALKABILITY_C_FIELD] = llclamp(pC, MIN_WALKABILITY_VALUE, MAX_WALKABILITY_VALUE);
}
if (mWalkabilityCoefficientD != pD)
{
- itemData["D"] = llclamp(pD, MIN_WALKABILITY_VALUE, MAX_WALKABILITY_VALUE);
+ itemData[LINKSET_WALKABILITY_D_FIELD] = llclamp(pD, MIN_WALKABILITY_VALUE, MAX_WALKABILITY_VALUE);
}
}
#else // XXX_STINSON_WALKABILITY_COEFFICIENTS_TYPE_CHANGE
if (mWalkabilityCoefficientA != pA)
{
- itemData["A"] = llclamp(pA, MIN_WALKABILITY_VALUE, MAX_WALKABILITY_VALUE);
+ itemData[LINKSET_WALKABILITY_A_FIELD] = llclamp(pA, MIN_WALKABILITY_VALUE, MAX_WALKABILITY_VALUE);
}
if (mWalkabilityCoefficientB != pB)
{
- itemData["B"] = llclamp(pB, MIN_WALKABILITY_VALUE, MAX_WALKABILITY_VALUE);
+ itemData[LINKSET_WALKABILITY_B_FIELD] = llclamp(pB, MIN_WALKABILITY_VALUE, MAX_WALKABILITY_VALUE);
}
if (mWalkabilityCoefficientC != pC)
{
- itemData["C"] = llclamp(pC, MIN_WALKABILITY_VALUE, MAX_WALKABILITY_VALUE);
+ itemData[LINKSET_WALKABILITY_C_FIELD] = llclamp(pC, MIN_WALKABILITY_VALUE, MAX_WALKABILITY_VALUE);
}
if (mWalkabilityCoefficientD != pD)
{
- itemData["D"] = llclamp(pD, MIN_WALKABILITY_VALUE, MAX_WALKABILITY_VALUE);
+ itemData[LINKSET_WALKABILITY_D_FIELD] = llclamp(pD, MIN_WALKABILITY_VALUE, MAX_WALKABILITY_VALUE);
}
#endif // XXX_STINSON_WALKABILITY_COEFFICIENTS_TYPE_CHANGE
if (mIsPhantom != pIsPhantom)
{
- itemData["phantom"] = static_cast<bool>(pIsPhantom);
+ itemData[LINKSET_PHANTOM_FIELD] = static_cast<bool>(pIsPhantom);
}
return itemData;
diff --git a/indra/newview/llpathfindinglinkset.h b/indra/newview/llpathfindinglinkset.h
index c6165907d0..d4e58874eb 100644
--- a/indra/newview/llpathfindinglinkset.h
+++ b/indra/newview/llpathfindinglinkset.h
@@ -47,7 +47,7 @@ public:
kIgnored
} EPathState;
- LLPathfindingLinkset(const std::string &pUUID, const LLSD &pNavMeshItem);
+ LLPathfindingLinkset(const std::string &pUUID, const LLSD &pLinksetItem);
LLPathfindingLinkset(const LLPathfindingLinkset& pOther);
virtual ~LLPathfindingLinkset();
@@ -81,7 +81,7 @@ public:
inline S32 getWalkabilityCoefficientD() const {return mWalkabilityCoefficientD;};
void setWalkabilityCoefficientD(S32 pD);
- LLSD getAlteredFields(EPathState pPathState, S32 pA, S32 pB, S32 pC, S32 pD, BOOL pIsPhantom) const;
+ LLSD encodeAlteredFields(EPathState pPathState, S32 pA, S32 pB, S32 pC, S32 pD, BOOL pIsPhantom) const;
protected:
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 7f2aefcc2b..ab03463bbc 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1984,33 +1984,42 @@ void LLViewerWindow::shutdownViews()
// clean up warning logger
LLError::removeRecorder(RecordToChatConsole::getInstance());
+ llinfos << "Warning logger is cleaned." << llendl ;
+
delete mDebugText;
mDebugText = NULL;
+ llinfos << "DebugText deleted." << llendl ;
+
// Cleanup global views
if (gMorphView)
{
gMorphView->setVisible(FALSE);
}
+ llinfos << "Global views cleaned." << llendl ;
// DEV-40930: Clear sModalStack. Otherwise, any LLModalDialog left open
// will crump with LL_ERRS.
LLModalDialog::shutdownModals();
-
+ llinfos << "LLModalDialog shut down." << llendl;
+
// destroy the nav bar, not currently part of gViewerWindow
// *TODO: Make LLNavigationBar part of gViewerWindow
if (LLNavigationBar::instanceExists())
{
delete LLNavigationBar::getInstance();
}
+ llinfos << "LLNavigationBar destroyed." << llendl ;
// destroy menus after instantiating navbar above, as it needs
// access to gMenuHolder
cleanup_menus();
+ llinfos << "menus destroyed." << llendl ;
// Delete all child views.
delete mRootView;
mRootView = NULL;
+ llinfos << "RootView deleted." << llendl ;
// Automatically deleted as children of mRootView. Fix the globals.
gStatusBar = NULL;
diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp
index 920a9a3752..0da70d398b 100644
--- a/indra/newview/llxmlrpctransaction.cpp
+++ b/indra/newview/llxmlrpctransaction.cpp
@@ -305,6 +305,15 @@ void LLXMLRPCTransaction::Impl::init(XMLRPC_REQUEST request, bool useGzip)
{
mCurlRequest = new LLCurlEasyRequest();
}
+ if(!mCurlRequest->isValid())
+ {
+ llwarns << "mCurlRequest is invalid." << llendl ;
+
+ delete mCurlRequest ;
+ mCurlRequest = NULL ;
+ return ;
+ }
+
mErrorCert = NULL;
// mCurlRequest->setopt(CURLOPT_VERBOSE, 1); // useful for debugging
@@ -357,10 +366,20 @@ LLXMLRPCTransaction::Impl::~Impl()
}
delete mCurlRequest;
+ mCurlRequest = NULL ;
}
bool LLXMLRPCTransaction::Impl::process()
{
+ if(!mCurlRequest || !mCurlRequest->isValid())
+ {
+ llwarns << "transaction failed." << llendl ;
+
+ delete mCurlRequest ;
+ mCurlRequest = NULL ;
+ return true ; //failed, quit.
+ }
+
switch(mStatus)
{
case LLXMLRPCTransaction::StatusComplete: