Merge
commit
7ee930ea4a
|
|
@ -364,13 +364,6 @@ U32 LLCurl::Easy::report(CURLcode code)
|
|||
responseCode = 499;
|
||||
responseReason = strerror(code) + " : " + mErrorBuffer;
|
||||
}
|
||||
|
||||
if(responseCode >= 300 && responseCode < 400) //redirect
|
||||
{
|
||||
char new_url[512] ;
|
||||
curl_easy_getinfo(mCurlEasyHandle, CURLINFO_REDIRECT_URL, new_url);
|
||||
responseReason = new_url ; //get the new URL.
|
||||
}
|
||||
|
||||
if (mResponder)
|
||||
{
|
||||
|
|
@ -469,6 +462,13 @@ void LLCurl::Easy::prepRequest(const std::string& url,
|
|||
setopt(CURLOPT_HEADERFUNCTION, (void*)&curlHeaderCallback);
|
||||
setopt(CURLOPT_HEADERDATA, (void*)this);
|
||||
|
||||
// Allow up to five redirects
|
||||
if(responder && responder->followRedir())
|
||||
{
|
||||
setopt(CURLOPT_FOLLOWLOCATION, 1);
|
||||
setopt(CURLOPT_MAXREDIRS, MAX_REDIRECTS);
|
||||
}
|
||||
|
||||
setErrorBuffer();
|
||||
setCA();
|
||||
|
||||
|
|
@ -1061,3 +1061,4 @@ void LLCurl::cleanupClass()
|
|||
curl_global_cleanup();
|
||||
}
|
||||
|
||||
const unsigned int LLCurl::MAX_REDIRECTS = 5;
|
||||
|
|
|
|||
|
|
@ -123,6 +123,11 @@ public:
|
|||
// Used internally to set the url for debugging later.
|
||||
void setURL(const std::string& url);
|
||||
|
||||
virtual bool followRedir()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public: /* but not really -- don't touch this */
|
||||
U32 mReferenceCount;
|
||||
|
||||
|
|
@ -182,6 +187,7 @@ public:
|
|||
private:
|
||||
static std::string sCAPath;
|
||||
static std::string sCAFile;
|
||||
static const unsigned int MAX_REDIRECTS;
|
||||
};
|
||||
|
||||
namespace boost
|
||||
|
|
|
|||
|
|
@ -109,11 +109,20 @@ void LLImageGL::checkTexSize(bool forced) const
|
|||
{
|
||||
if ((forced || gDebugGL) && mTarget == GL_TEXTURE_2D)
|
||||
{
|
||||
{
|
||||
//check viewport
|
||||
GLint vp[4] ;
|
||||
glGetIntegerv(GL_VIEWPORT, vp) ;
|
||||
llcallstacks << "viewport: " << vp[0] << " : " << vp[1] << " : " << vp[2] << " : " << vp[3] << llcallstacksendl ;
|
||||
}
|
||||
|
||||
GLint texname;
|
||||
glGetIntegerv(GL_TEXTURE_BINDING_2D, &texname);
|
||||
BOOL error = FALSE;
|
||||
if (texname != mTexName)
|
||||
{
|
||||
llinfos << "Bound: " << texname << " Should bind: " << mTexName << " Default: " << LLImageGL::sDefaultGLTexture->getTexName() << llendl;
|
||||
|
||||
error = TRUE;
|
||||
if (gDebugSession)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -81,17 +81,6 @@ LLCheckBoxCtrl::LLCheckBoxCtrl(const LLCheckBoxCtrl::Params& p)
|
|||
// must be big enough to hold all children
|
||||
setUseBoundingRect(TRUE);
|
||||
|
||||
// Label (add a little space to make sure text actually renders)
|
||||
const S32 FUDGE = 10;
|
||||
S32 text_width = mFont->getWidth( p.label ) + FUDGE;
|
||||
S32 text_height = llround(mFont->getLineHeight());
|
||||
LLRect label_rect;
|
||||
label_rect.setOriginAndSize(
|
||||
llcheckboxctrl_hpad + llcheckboxctrl_btn_size + llcheckboxctrl_spacing,
|
||||
llcheckboxctrl_vpad + 1, // padding to get better alignment
|
||||
text_width + llcheckboxctrl_hpad,
|
||||
text_height );
|
||||
|
||||
// *HACK Get rid of this with SL-55508...
|
||||
// this allows blank check boxes and radio boxes for now
|
||||
std::string local_label = p.label;
|
||||
|
|
@ -101,7 +90,6 @@ LLCheckBoxCtrl::LLCheckBoxCtrl(const LLCheckBoxCtrl::Params& p)
|
|||
}
|
||||
|
||||
LLTextBox::Params tbparams = p.label_text;
|
||||
tbparams.rect(label_rect);
|
||||
tbparams.initial_value(local_label);
|
||||
if (p.font.isProvided())
|
||||
{
|
||||
|
|
@ -111,6 +99,17 @@ LLCheckBoxCtrl::LLCheckBoxCtrl(const LLCheckBoxCtrl::Params& p)
|
|||
mLabel = LLUICtrlFactory::create<LLTextBox> (tbparams);
|
||||
addChild(mLabel);
|
||||
|
||||
S32 text_width = mLabel->getTextBoundingRect().getWidth();
|
||||
S32 text_height = llround(mFont->getLineHeight());
|
||||
LLRect label_rect;
|
||||
label_rect.setOriginAndSize(
|
||||
llcheckboxctrl_hpad + llcheckboxctrl_btn_size + llcheckboxctrl_spacing,
|
||||
llcheckboxctrl_vpad + 1, // padding to get better alignment
|
||||
text_width + llcheckboxctrl_hpad,
|
||||
text_height );
|
||||
mLabel->setShape(label_rect);
|
||||
|
||||
|
||||
// Button
|
||||
// Note: button cover the label by extending all the way to the right.
|
||||
LLRect btn_rect;
|
||||
|
|
@ -190,8 +189,7 @@ void LLCheckBoxCtrl::reshape(S32 width, S32 height, BOOL called_from_parent)
|
|||
static LLUICachedControl<S32> llcheckboxctrl_vpad ("UICheckboxctrlVPad", 0);
|
||||
static LLUICachedControl<S32> llcheckboxctrl_btn_size ("UICheckboxctrlBtnSize", 0);
|
||||
|
||||
const S32 FUDGE = 10;
|
||||
S32 text_width = mLabel->getTextBoundingRect().getWidth() + FUDGE;
|
||||
S32 text_width = mLabel->getTextBoundingRect().getWidth();
|
||||
S32 text_height = llround(mFont->getLineHeight());
|
||||
LLRect label_rect;
|
||||
label_rect.setOriginAndSize(
|
||||
|
|
@ -199,7 +197,7 @@ void LLCheckBoxCtrl::reshape(S32 width, S32 height, BOOL called_from_parent)
|
|||
llcheckboxctrl_vpad,
|
||||
text_width,
|
||||
text_height );
|
||||
mLabel->setRect(label_rect);
|
||||
mLabel->setShape(label_rect);
|
||||
|
||||
LLRect btn_rect;
|
||||
btn_rect.setOriginAndSize(
|
||||
|
|
@ -207,7 +205,7 @@ void LLCheckBoxCtrl::reshape(S32 width, S32 height, BOOL called_from_parent)
|
|||
llcheckboxctrl_vpad,
|
||||
llcheckboxctrl_btn_size + llcheckboxctrl_spacing + text_width,
|
||||
llmax( text_height, llcheckboxctrl_btn_size() ) );
|
||||
mButton->setRect( btn_rect );
|
||||
mButton->setShape( btn_rect );
|
||||
|
||||
LLUICtrl::reshape(width, height, called_from_parent);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -167,6 +167,10 @@ void LLViewerDynamicTexture::postRender(BOOL success)
|
|||
{
|
||||
generateGLTexture() ;
|
||||
}
|
||||
if(!mGLTexturep->getHasGLTexture())
|
||||
{
|
||||
generateGLTexture() ;
|
||||
}
|
||||
llcallstacks << "class type: " << (S32)getType() << llcallstacksendl ;
|
||||
|
||||
success = mGLTexturep->setSubImageFromFrameBuffer(0, 0, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight);
|
||||
|
|
|
|||
|
|
@ -290,8 +290,8 @@ class HTTPGetResponder : public LLCurl::Responder
|
|||
{
|
||||
LOG_CLASS(HTTPGetResponder);
|
||||
public:
|
||||
HTTPGetResponder(LLTextureFetch* fetcher, const LLUUID& id, U64 startTime, S32 requestedSize, U32 offset)
|
||||
: mFetcher(fetcher), mID(id), mStartTime(startTime), mRequestedSize(requestedSize), mOffset(offset)
|
||||
HTTPGetResponder(LLTextureFetch* fetcher, const LLUUID& id, U64 startTime, S32 requestedSize, U32 offset, bool redir)
|
||||
: mFetcher(fetcher), mID(id), mStartTime(startTime), mRequestedSize(requestedSize), mOffset(offset), mFollowRedir(redir)
|
||||
{
|
||||
}
|
||||
~HTTPGetResponder()
|
||||
|
|
@ -344,6 +344,11 @@ public:
|
|||
llwarns << "Worker not found: " << mID << llendl;
|
||||
}
|
||||
}
|
||||
|
||||
virtual bool followRedir()
|
||||
{
|
||||
return mFollowRedir;
|
||||
}
|
||||
|
||||
private:
|
||||
LLTextureFetch* mFetcher;
|
||||
|
|
@ -351,6 +356,7 @@ private:
|
|||
U64 mStartTime;
|
||||
S32 mRequestedSize;
|
||||
U32 mOffset;
|
||||
bool mFollowRedir;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -897,7 +903,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
|||
std::vector<std::string> headers;
|
||||
headers.push_back("Accept: image/x-j2c");
|
||||
res = mFetcher->mCurlGetRequest->getByteRange(mUrl, headers, offset, mRequestedSize,
|
||||
new HTTPGetResponder(mFetcher, mID, LLTimer::getTotalTime(), mRequestedSize, offset));
|
||||
new HTTPGetResponder(mFetcher, mID, LLTimer::getTotalTime(), mRequestedSize, offset, true));
|
||||
}
|
||||
if (!res)
|
||||
{
|
||||
|
|
@ -945,17 +951,6 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
|||
max_attempts = mHTTPFailCount+1; // Keep retrying
|
||||
LL_INFOS_ONCE("Texture") << "Texture server busy (503): " << mUrl << LL_ENDL;
|
||||
}
|
||||
else if(mGetStatus >= HTTP_MULTIPLE_CHOICES && mGetStatus < HTTP_BAD_REQUEST) //http re-direct
|
||||
{
|
||||
++mHTTPFailCount;
|
||||
max_attempts = 5 ; //try at most 5 times to avoid infinite redirection loop.
|
||||
|
||||
llwarns << "HTTP GET failed because of redirection: " << mUrl
|
||||
<< " Status: " << mGetStatus << " Reason: '" << mGetReason << llendl ;
|
||||
|
||||
//assign to the new url
|
||||
mUrl = mGetReason ;
|
||||
}
|
||||
else
|
||||
{
|
||||
const S32 HTTP_MAX_RETRY_COUNT = 3;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<floater name="Water Floater" title="ÉDITEUR D'EAU AVANCÉ">
|
||||
<floater.string name="WLDefaultWaterNames">
|
||||
Default:Glassy:Pond:Murky:Second Plague:SNAKE!!!:Valdez
|
||||
Valeur par défaut:Transparente:Bassin:Trouble:Première plaie:SERPENT !!!:Valdez
|
||||
</floater.string>
|
||||
<text name="KeyFramePresetsText" width="120">
|
||||
Préréglages :
|
||||
|
|
|
|||
|
|
@ -184,6 +184,6 @@
|
|||
</panel>
|
||||
</tab_container>
|
||||
<string name="WLDefaultSkyNames">
|
||||
A-12AM:A-12PM:A-3AM:A-3PM:A-4.30PM:A-6AM:A-6PM:A-9AM:A-9PM:Barcelona:Blizzard:Blue Midday:Coastal Afternoon:Coastal Sunset:Default:Desert Sunset:Fine Day:Fluffy Big Clouds:Foggy:Funky Funky:Funky Funky Funky:Gelatto:Ghost:Incongruent Truths:Midday 1:Midday 2:Midday 3:Midday 4:Night:Pirate:Purple:Sailor's Delight:Sheer Sensuality
|
||||
A-Minuit:A-Midi:A-3h:A-15h:A-16h30:A-6h:A-18h:A-9h:A-21h:Barcelone:Blizzard:Bleu mi-journée:Après-midi sur la côte:Coucher de soleil (côte):Valeur par défaut:Coucher de soleil (désert):Belle journée:Gros nuages floconneux:Brumeux:Funky Funky:Funky Funky Funky:Gelatto:Fantôme:Vérités incohérentes:Mi-journée 1:Mi-journée 2:Mi-journée 3:Mi-journée 4:Nuit:Pirate:Mauve:Rêve de navigateur:Sensualité pure
|
||||
</string>
|
||||
</floater>
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
Médias proches
|
||||
</text>
|
||||
<text name="show_text">
|
||||
Afficher :
|
||||
Voir :
|
||||
</text>
|
||||
<combo_box name="show_combo">
|
||||
<combo_box.item label="Tout" name="All"/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue