Merge branch 'master' of git://github.com/AlericInglewood/SingularityViewer
This commit is contained in:
@@ -308,9 +308,10 @@ LLAtomicU32 Stats::llsd_body_count;
|
||||
LLAtomicU32 Stats::llsd_body_parse_error;
|
||||
LLAtomicU32 Stats::raw_body_count;
|
||||
|
||||
// Called from BufferedCurlEasyRequest::setStatusAndReason.
|
||||
// The only allowed values for 'status' are S <= status < S+20, where S={100,200,300,400,500}.
|
||||
U32 Stats::status2index(U32 status)
|
||||
{
|
||||
llassert_always(status >= 100 && status < 600 && (status % 100) < 20); // Max value 519.
|
||||
return (status - 100) / 100 * 20 + status % 100; // Returns 0..99 (for status 100..519).
|
||||
}
|
||||
|
||||
|
||||
@@ -2268,7 +2268,11 @@ void BufferedCurlEasyRequest::setStatusAndReason(U32 status, std::string const&
|
||||
{
|
||||
mStatus = status;
|
||||
mReason = reason;
|
||||
AICurlInterface::Stats::status_count[AICurlInterface::Stats::status2index(mStatus)]++;
|
||||
if (status >= 100 && status < 600 && (status % 100) < 20)
|
||||
{
|
||||
// Only count statistic for sane values.
|
||||
AICurlInterface::Stats::status_count[AICurlInterface::Stats::status2index(mStatus)]++;
|
||||
}
|
||||
|
||||
// Sanity check. If the server replies with a redirect status then we better have that option turned on!
|
||||
if ((status >= 300 && status < 400) && mResponder && !mResponder->redirect_status_ok())
|
||||
@@ -2419,23 +2423,31 @@ size_t BufferedCurlEasyRequest::curlHeaderCallback(char* data, size_t size, size
|
||||
std::string::iterator pos2 = std::find(pos1, end, ' ');
|
||||
if (pos2 != end) ++pos2;
|
||||
std::string::iterator pos3 = std::find(pos2, end, '\r');
|
||||
U32 status;
|
||||
U32 status = 0;
|
||||
std::string reason;
|
||||
if (pos3 != end && std::isdigit(*pos1))
|
||||
{
|
||||
status = atoi(&header_line[pos1 - begin]);
|
||||
reason.assign(pos2, pos3);
|
||||
}
|
||||
else
|
||||
if (!(status >= 100 && status < 600 && (status % 100) < 20)) // Sanity check on the decoded status.
|
||||
{
|
||||
if (status == 0)
|
||||
{
|
||||
reason = "Header parse error.";
|
||||
llwarns << "Received broken header line from server: \"" << header << "\"" << llendl;
|
||||
}
|
||||
else
|
||||
{
|
||||
reason = "Unexpected HTTP status.";
|
||||
llwarns << "Received unexpected status value from server (" << status << "): \"" << header << "\"" << llendl;
|
||||
}
|
||||
// Either way, this status value is not understood (or taken into account).
|
||||
// Set it to internal error so that the rest of code treats it as an error.
|
||||
status = HTTP_INTERNAL_ERROR;
|
||||
reason = "Header parse error.";
|
||||
llwarns << "Received broken header line from server: \"" << header << "\"" << llendl;
|
||||
}
|
||||
{
|
||||
self_w->received_HTTP_header();
|
||||
self_w->setStatusAndReason(status, reason);
|
||||
}
|
||||
self_w->received_HTTP_header();
|
||||
self_w->setStatusAndReason(status, reason);
|
||||
return header_len;
|
||||
}
|
||||
|
||||
|
||||
@@ -1513,7 +1513,6 @@ DECL_LLCC(S32, (S32)-666);
|
||||
DECL_LLCC(F32, (F32)-666.666);
|
||||
DECL_LLCC(bool, true);
|
||||
DECL_LLCC(BOOL, FALSE);
|
||||
static LLCachedControl<std::string> mySetting_string("TestCachedControlstring", "Default String Value");
|
||||
DECL_LLCC(LLVector3, LLVector3(1.0f, 2.0f, 3.0f));
|
||||
DECL_LLCC(LLVector3d, LLVector3d(6.0f, 5.0f, 4.0f));
|
||||
DECL_LLCC(LLRect, LLRect(0, 0, 100, 500));
|
||||
@@ -1523,10 +1522,11 @@ DECL_LLCC(LLColor3, LLColor3(1.0f, 0.f, 0.5f));
|
||||
LLSD test_llsd = LLSD()["testing1"] = LLSD()["testing2"];
|
||||
DECL_LLCC(LLSD, test_llsd);
|
||||
|
||||
static LLCachedControl<std::string> test_BrowserHomePage("BrowserHomePage", "hahahahahha", "Not the real comment");
|
||||
|
||||
void test_cached_control()
|
||||
{
|
||||
static const LLCachedControl<std::string> mySetting_string("TestCachedControlstring", "Default String Value");
|
||||
static const LLCachedControl<std::string> test_BrowserHomePage("BrowserHomePage", "hahahahahha", "Not the real comment");
|
||||
|
||||
#define TEST_LLCC(T, V) if((T)mySetting_##T != V) llerrs << "Fail "#T << llendl; \
|
||||
mySetting_##T = V;\
|
||||
if((T)mySetting_##T != V) llerrs << "Fail "#T << "Pass # 2" << llendl;
|
||||
|
||||
@@ -568,8 +568,8 @@ U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy)
|
||||
{
|
||||
// This warning will always trigger if you've hacked the avatar to show as incomplete.
|
||||
// Ignore the warning if that's the case.
|
||||
static const LLCachedControl<bool> rener_unloaded_avatar("RenderUnloadedAvatar");
|
||||
if (!rener_unloaded_avatar)
|
||||
static const LLCachedControl<bool> render_unloaded_avatar("RenderUnloadedAvatar", false);
|
||||
if (!render_unloaded_avatar)
|
||||
{
|
||||
llwarns << "Layerset without composite" << llendl;
|
||||
}
|
||||
|
||||
@@ -993,12 +993,6 @@ EmeraldGlobalBoobConfig LLVOAvatar::sBoobConfig;
|
||||
static F32 calc_bouncy_animation(F32 x);
|
||||
static U32 calc_shame(LLVOVolume* volume, std::set<LLUUID> &textures);
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Debug setting caches.
|
||||
//-----------------------------------------------------------------------------
|
||||
static LLCachedControl<bool> const freeze_time("FreezeTime", false);
|
||||
static LLCachedControl<bool> const render_unloaded_avatar("RenderUnloadedAvatar", false);
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// LLVOAvatar()
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -1011,7 +1005,6 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
|
||||
mAttachmentGeometryBytes(0),
|
||||
mAttachmentSurfaceArea(0.f),
|
||||
mTurning(FALSE),
|
||||
mFreezeTimeLangolier(freeze_time),
|
||||
mFreezeTimeDead(false),
|
||||
mPelvisToFoot(0.f),
|
||||
mLastSkeletonSerialNum( 0 ),
|
||||
@@ -1053,7 +1046,6 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
|
||||
mSupportsAlphaLayers(FALSE),
|
||||
mLoadedCallbacksPaused(FALSE),
|
||||
mHasPelvisOffset( FALSE ),
|
||||
mRenderUnloadedAvatar(render_unloaded_avatar),
|
||||
mLastRezzedStatus(-1),
|
||||
mFirstSetActualBoobGravRan( false ),
|
||||
mSupportsPhysics( false ),
|
||||
@@ -1062,6 +1054,9 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
|
||||
mCCSChatTextOverride(false)
|
||||
// </edit>
|
||||
{
|
||||
static LLCachedControl<bool> const freeze_time("FreezeTime", false);
|
||||
mFreezeTimeLangolier = freeze_time;
|
||||
|
||||
LLMemType mt(LLMemType::MTYPE_AVATAR);
|
||||
//VTResume(); // VTune
|
||||
|
||||
@@ -7662,9 +7657,11 @@ BOOL LLVOAvatar::processFullyLoadedChange(bool loading)
|
||||
|
||||
BOOL LLVOAvatar::isFullyLoaded() const
|
||||
{
|
||||
static LLCachedControl<bool> const render_unloaded_avatar("RenderUnloadedAvatar", false);
|
||||
|
||||
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.2.0a) | Added: Catznip-2.2.0a
|
||||
// Changes to LLAppearanceMgr::updateAppearanceFromCOF() expect this function to actually return mFullyLoaded for gAgentAvatarp
|
||||
if ( (!isSelf()) && (mRenderUnloadedAvatar) )
|
||||
if ( (!isSelf()) && render_unloaded_avatar )
|
||||
return TRUE;
|
||||
else
|
||||
return mFullyLoaded;
|
||||
|
||||
@@ -533,8 +533,6 @@ private:
|
||||
F32 mImpostorDistance;
|
||||
F32 mImpostorPixelArea;
|
||||
LLVector3 mLastAnimExtents[2];
|
||||
|
||||
LLCachedControl<bool> mRenderUnloadedAvatar;
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Wind rippling in clothes
|
||||
|
||||
Reference in New Issue
Block a user