diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llmessage/llcurl.cpp | 15 | ||||
-rw-r--r-- | indra/llmessage/llcurl.h | 6 | ||||
-rw-r--r-- | indra/llrender/llimagegl.cpp | 9 | ||||
-rw-r--r-- | indra/llui/llcheckboxctrl.cpp | 30 | ||||
-rw-r--r-- | indra/newview/llappearancemgr.cpp | 6 | ||||
-rw-r--r-- | indra/newview/lldynamictexture.cpp | 4 | ||||
-rw-r--r-- | indra/newview/lllogininstance.cpp | 19 | ||||
-rw-r--r-- | indra/newview/lltexturefetch.cpp | 23 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/fr/floater_water.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/fr/floater_windlight_options.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/fr/panel_nearby_media.xml | 2 |
11 files changed, 68 insertions, 50 deletions
diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp index 36874a5d48..ac50411de8 100644 --- a/indra/llmessage/llcurl.cpp +++ b/indra/llmessage/llcurl.cpp @@ -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; diff --git a/indra/llmessage/llcurl.h b/indra/llmessage/llcurl.h index b6a637ae5b..20ca87c87b 100644 --- a/indra/llmessage/llcurl.h +++ b/indra/llmessage/llcurl.h @@ -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 diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 2d408f8e10..69ef3f9ed7 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -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) { diff --git a/indra/llui/llcheckboxctrl.cpp b/indra/llui/llcheckboxctrl.cpp index 6f81f5434c..0c524cd470 100644 --- a/indra/llui/llcheckboxctrl.cpp +++ b/indra/llui/llcheckboxctrl.cpp @@ -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); } diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index d6ac6e1e5e..5e0d49ac12 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -2731,10 +2731,14 @@ void wear_multiple(const uuid_vec_t& ids, bool replace) { LLPointer<LLInventoryCallback> cb = new LLUpdateAppearanceOnDestroy; + bool first = true; uuid_vec_t::const_iterator it; for (it = ids.begin(); it != ids.end(); ++it) { - LLAppearanceMgr::instance().wearItemOnAvatar(*it,false,replace,cb); + // if replace is requested, the first item worn will replace the current top + // item, and others will be added. + LLAppearanceMgr::instance().wearItemOnAvatar(*it,false,first && replace,cb); + first = false; } } diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp index c423473740..bb4e6c7a3e 100644 --- a/indra/newview/lldynamictexture.cpp +++ b/indra/newview/lldynamictexture.cpp @@ -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); diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index 06f490e8e3..32c358368a 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -58,6 +58,7 @@ #endif #include "llsecapi.h" #include "llstartup.h" +#include "llmachineid.h" static const char * const TOS_REPLY_PUMP = "lllogininstance_tos_callback"; static const char * const TOS_LISTENER_NAME = "lllogininstance_tos"; @@ -165,22 +166,22 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia // (re)initialize the request params with creds. LLSD request_params = user_credential->getLoginParams(); - char hashed_mac_string[MD5HEX_STR_SIZE]; /* Flawfinder: ignore */ - LLMD5 hashed_mac; - unsigned char MACAddress[MAC_ADDRESS_BYTES]; - if(LLUUID::getNodeID(MACAddress) == 0) { - llerrs << "Failed to get node id; cannot uniquely identify this machine." << llendl; + char hashed_unique_id_string[MD5HEX_STR_SIZE]; /* Flawfinder: ignore */ + LLMD5 hashed_unique_id; + unsigned char unique_id[MAC_ADDRESS_BYTES]; + if(LLMachineID::getUniqueID(unique_id, sizeof(unique_id)) == 0) { + llerrs << "Failed to get an id; cannot uniquely identify this machine." << llendl; } - hashed_mac.update( MACAddress, MAC_ADDRESS_BYTES ); - hashed_mac.finalize(); - hashed_mac.hex_digest(hashed_mac_string); + hashed_unique_id.update(unique_id, MAC_ADDRESS_BYTES); + hashed_unique_id.finalize(); + hashed_unique_id.hex_digest(hashed_unique_id_string); request_params["start"] = construct_start_string(); request_params["skipoptional"] = mSkipOptionalUpdate; request_params["agree_to_tos"] = false; // Always false here. Set true in request_params["read_critical"] = false; // handleTOSResponse request_params["last_exec_event"] = mLastExecEvent; - request_params["mac"] = hashed_mac_string; + request_params["mac"] = hashed_unique_id_string; request_params["version"] = gCurrentVersion; // Includes channel name request_params["channel"] = gSavedSettings.getString("VersionChannelName"); request_params["id0"] = mSerialNumber; diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index ceed90e210..dddfed097d 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -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; diff --git a/indra/newview/skins/default/xui/fr/floater_water.xml b/indra/newview/skins/default/xui/fr/floater_water.xml index 96723b0fe6..7d1e3cd65c 100644 --- a/indra/newview/skins/default/xui/fr/floater_water.xml +++ b/indra/newview/skins/default/xui/fr/floater_water.xml @@ -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 : diff --git a/indra/newview/skins/default/xui/fr/floater_windlight_options.xml b/indra/newview/skins/default/xui/fr/floater_windlight_options.xml index 74f1697449..657e5f5051 100644 --- a/indra/newview/skins/default/xui/fr/floater_windlight_options.xml +++ b/indra/newview/skins/default/xui/fr/floater_windlight_options.xml @@ -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> diff --git a/indra/newview/skins/default/xui/fr/panel_nearby_media.xml b/indra/newview/skins/default/xui/fr/panel_nearby_media.xml index 978ca86d62..1a6101830b 100644 --- a/indra/newview/skins/default/xui/fr/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/fr/panel_nearby_media.xml @@ -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"/> |