Merge Firestorm LGPL

master
Ansariel 2016-02-15 10:31:04 +01:00
commit 51909c8efa
21 changed files with 134 additions and 21 deletions

View File

@ -332,6 +332,7 @@ Cinder Roxley
STORM-2053
STORM-2105
STORM-2113
STORM-2124
Clara Young
Coaldust Numbers
VWR-1095

View File

@ -358,6 +358,60 @@ bool HttpLibcurl::completeRequest(CURLM * multi_handle, CURL * handle, CURLcode
}
}
// <FS:NS> See if the requested URL matches a X-LL-URL header (if present) and the requested range.
// If not, we assume http pipelining havng gone out of sync. If yes, yield a 503 status and switch
// pipelining off.
bool bFailed = false;
if( op->mXLLURL.size() )
{
std::string strURI = op->mReqURL;
int i = strURI.find( "://" );
if( i > 0 )
i = strURI.find( "/", i+3 );
if( i > 0 )
strURI = strURI.substr( i );
if( strURI != op->mXLLURL )
{
LL_WARNS() << "HTTP pipelining out of sync! Asked for: " << strURI << " got " << op->mXLLURL << LL_ENDL;
op->mStatus = HttpStatus(HTTP_SERVICE_UNAVAILABLE);
bFailed = true;
}
}
if ( !bFailed && (op->mReqOffset || op->mReqLength) )
{
if( op->mReqOffset != op->mReplyOffset || ( op->mReqLength && op->mReqLength < op->mReplyLength ) )
{
std::stringstream strm;
strm << "HTTP pipelining possibly out of sync, request wanted: " << op->mReqOffset << "-";
if( op->mReqLength )
strm << op->mReqLength + op->mReqLength -1;
strm << " got: " << op->mReplyOffset << "-" << op->mReplyOffset+op->mReplyLength-1;
strm << " url: " << op->mReqURL;
LL_WARNS() << strm.str() << LL_ENDL;
op->mStatus = HttpStatus(HTTP_SERVICE_UNAVAILABLE);
bFailed = true;
}
}
if( bFailed )
{
HttpPolicy & policy(mService->getPolicy());
for( int i = 0; i < mPolicyCount; ++ i )
{
HttpPolicyClass & options(policy.getClassOptions(i));
long lVal;
if( options.get( LLCore::HttpRequest::PO_PIPELINING_DEPTH, &lVal ) && lVal )
{
options.set( LLCore::HttpRequest::PO_PIPELINING_DEPTH, 0 );
mDirtyPolicy[ i ] = true;
policyUpdated( i );
}
}
}
// /</FS:ND>
// Detach from multi and recycle handle
curl_multi_remove_handle(multi_handle, handle);
mHandleCache.freeHandle(op->mCurlHandle);

View File

@ -810,7 +810,14 @@ size_t HttpOpRequest::headerCallback(void * data, size_t size, size_t nmemb, voi
// No use continuing
return hdr_size;
}
// <FS:ND> To detect pipelining going out of sync, save a x-ll-url header and later compare it with the requested URL.
// We do not bail here already, but rather postpone it until the request is finised, then yield a 503 status
// (request will be retried) and turn pipelining off.
if( value && std::string( "x-ll-url" ) == name )
op->mXLLURL = value;
// </FS:ND>
// Save header if caller wants them in the response
if (is_header && op->mProcFlags & PF_SAVE_HEADERS)
{

View File

@ -187,7 +187,7 @@ public:
HttpHeaders * mReplyHeaders;
std::string mReplyConType;
int mReplyRetryAfter;
std::string mXLLURL; // <FS:ND/> If we get a x-ll-url header, save it here, even if mReplyHeaders is not filled.
// Policy data
int mPolicyRetries;
int mPolicy503Retries;

View File

@ -2481,11 +2481,15 @@ void LLFloaterView::restoreAll()
// make sure all subwindows aren't minimized
for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it)
{
LLFloater* floaterp = (LLFloater*)*child_it;
if (floaterp) //<FS:KC> Possible fix for crash on disconnect
// <FS:Ansariel> Possible fix for crash on disconnect
//LLFloater* floaterp = (LLFloater*)*child_it;
//floaterp->setMinimized(FALSE);
LLFloater* floaterp = dynamic_cast<LLFloater*>(*child_it);
if (floaterp)
{
floaterp->setMinimized(FALSE);
}
// </FS:Ansariel>
}
// *FIX: make sure dependents are restored

View File

@ -160,11 +160,12 @@ BOOL AnimationExplorer::postBuild()
mPreviewCtrl = findChild<LLView>("animation_preview");
if (mPreviewCtrl)
{
mAnimationPreview = new LLPreviewAnimation(
mPreviewCtrl->getRect().getWidth(),mPreviewCtrl->getRect().getHeight()
);
mAnimationPreview->setZoom(2.0f);
startMotion(LLUUID::null);
if (isAgentAvatarValid())
{
mAnimationPreview = new LLPreviewAnimation(mPreviewCtrl->getRect().getWidth(), mPreviewCtrl->getRect().getHeight());
mAnimationPreview->setZoom(2.0f);
startMotion(LLUUID::null);
}
}
else
{

View File

@ -4,6 +4,7 @@
<font name="default" comment="default font files (global fallbacks)">
<file>DejaVuSans.ttf</file>
<os name="Windows">
<file>YuGothR.ttc</file>
<file>MSGOTHIC.TTC</file>
<file>gulim.ttc</file>
<file>simhei.ttf</file>

View File

@ -4,6 +4,7 @@
<font name="default" comment="default font files (global fallbacks)">
<file>DejaVuSansAllCaps.ttf</file>
<os name="Windows">
<file>YuGothR.ttc</file>
<file>MSGOTHIC.TTC</file>
<file>gulim.ttc</file>
<file>simhei.ttf</file>
@ -11,6 +12,7 @@
<file>seguisym.ttf</file>
</os>
<os name="Mac">
<file>ヒラギノ角ゴシック W3.ttc</file>
<file>ヒラギノ角ゴ Pro W3.otf</file>
<file>ヒラギノ角ゴ ProN W3.otf</file>
<file>AppleGothic.dfont</file>

View File

@ -4,6 +4,7 @@
<font name="default" comment="default font files (global fallbacks)">
<file>DroidSans.ttf</file>
<os name="Windows">
<file>YuGothR.ttc</file>
<file>MSGOTHIC.TTC</file>
<file>gulim.ttc</file>
<file>simhei.ttf</file>
@ -11,6 +12,7 @@
<file>seguisym.ttf</file>
</os>
<os name="Mac">
<file>ヒラギノ角ゴシック W3.ttc</file>
<file>ヒラギノ角ゴ Pro W3.otf</file>
<file>ヒラギノ角ゴ ProN W3.otf</file>
<file>AppleGothic.dfont</file>

View File

@ -4,6 +4,7 @@
<font name="default" comment="default font files (global fallbacks)">
<file>MobiSans.ttf</file>
<os name="Windows">
<file>YuGothR.ttc</file>
<file>MSGOTHIC.TTC</file>
<file>gulim.ttc</file>
<file>simhei.ttf</file>
@ -11,6 +12,7 @@
<file>seguisym.ttf</file>
</os>
<os name="Mac">
<file>ヒラギノ角ゴシック W3.ttc</file>
<file>ヒラギノ角ゴ Pro W3.otf</file>
<file>ヒラギノ角ゴ ProN W3.otf</file>
<file>AppleGothic.dfont</file>

View File

@ -4,6 +4,7 @@
<font name="default" comment="default font files (global fallbacks)">
<file>LiberationSans-Regular.ttf</file>
<os name="Windows">
<file>YuGothR.ttc</file>
<file>MSGOTHIC.TTC</file>
<file>gulim.ttc</file>
<file>simhei.ttf</file>
@ -11,6 +12,7 @@
<file>seguisym.ttf</file>
</os>
<os name="Mac">
<file>ヒラギノ角ゴシック W3.ttc</file>
<file>ヒラギノ角ゴ Pro W3.otf</file>
<file>ヒラギノ角ゴ ProN W3.otf</file>
<file>AppleGothic.dfont</file>

View File

@ -4,6 +4,7 @@
<font name="default" comment="default font files (global fallbacks)">
<file>MobiSans.ttf</file>
<os name="Windows">
<file>YuGothR.ttc</file>
<file>MSGOTHIC.TTC</file>
<file>gulim.ttc</file>
<file>simhei.ttf</file>
@ -11,6 +12,7 @@
<file>seguisym.ttf</file>
</os>
<os name="Mac">
<file>ヒラギノ角ゴシック W3.ttc</file>
<file>ヒラギノ角ゴ Pro W3.otf</file>
<file>ヒラギノ角ゴ ProN W3.otf</file>
<file>AppleGothic.dfont</file>

View File

@ -4,6 +4,7 @@
<font name="default" comment="default font files (global fallbacks)">
<file>DroidSans.ttf</file>
<os name="Windows">
<file>YuGothR.ttc</file>
<file>MSGOTHIC.TTC</file>
<file>gulim.ttc</file>
<file>simhei.ttf</file>
@ -11,6 +12,7 @@
<file>seguisym.ttf</file>
</os>
<os name="Mac">
<file>ヒラギノ角ゴシック W3.ttc</file>
<file>ヒラギノ角ゴ Pro W3.otf</file>
<file>ヒラギノ角ゴ ProN W3.otf</file>
<file>AppleGothic.dfont</file>

View File

@ -4,6 +4,7 @@
<font name="default" comment="default font files (global fallbacks)">
<file>Ubuntu-R.ttf</file>
<os name="Windows">
<file>YuGothR.ttc</file>
<file>MSGOTHIC.TTC</file>
<file>gulim.ttc</file>
<file>simhei.ttf</file>
@ -11,6 +12,7 @@
<file>seguisym.ttf</file>
</os>
<os name="Mac">
<file>ヒラギノ角ゴシック W3.ttc</file>
<file>ヒラギノ角ゴ Pro W3.otf</file>
<file>ヒラギノ角ゴ ProN W3.otf</file>
<file>AppleGothic.dfont</file>

View File

@ -257,7 +257,8 @@ void LLFloaterLand::onOpen(const LLSD& key)
mParcel = LLViewerParcelMgr::getInstance()->getFloatingParcelSelection();
// <FS:Ansariel> FIRE-17280: Requesting Experience access allow & block list breaks OpenSim
if (!LLViewerParcelMgr::getInstance()->getSelectionRegion()->isCapabilityAvailable("RegionExperiences"))
LLViewerRegion* selected_region = LLViewerParcelMgr::getInstance()->getSelectionRegion();
if (!selected_region || !selected_region->isCapabilityAvailable("RegionExperiences"))
{
mTabLand->removeTabPanel(mTabLand->getPanelByName("land_experiences_panel"));
}
@ -499,7 +500,10 @@ BOOL LLPanelLandGeneral::postBuild()
// note: on region change this will not be re checked, should not matter on Agni as
// 99% of the time all regions will return the same caps. In case of an erroneous setting
// to enabled the floater will just throw an error when trying to get it's cap
std::string url = gAgent.getRegion()->getCapability("LandResources");
// <FS:Ansariel> Crash fix
//std::string url = gAgent.getRegion()->getCapability("LandResources");
std::string url = gAgent.getRegion() ? gAgent.getRegion()->getCapability("LandResources") : "";
// </FS:Ansariel>
if (!url.empty())
{
mBtnScriptLimits = getChild<LLButton>("Scripts...");

View File

@ -225,7 +225,7 @@ BOOL LLFloaterRegionInfo::postBuild()
// <FS:CR> Aurora Sim - Region Settings Console
// We only use this panel on Aurora-based sims
std::string url = gAgent.getRegion()->getCapability("DispatchOpenRegionSettings");
std::string url = gAgent.getRegion() ? gAgent.getRegion()->getCapability("DispatchOpenRegionSettings") : "";
if (!url.empty())
{
panel = new LLPanelRegionOpenSettingsInfo;
@ -250,7 +250,10 @@ BOOL LLFloaterRegionInfo::postBuild()
panel->buildFromFile("panel_region_debug.xml");
mTab->addTabPanel(panel);
if(!gAgent.getRegion()->getCapability("RegionExperiences").empty())
// <FS:Ansariel> Crash fix
//if(!gAgent.getRegion()->getCapability("RegionExperiences").empty())
if (gAgent.getRegion() && !gAgent.getRegion()->getCapability("RegionExperiences").empty())
// </FS:Ansariel>
{
panel = new LLPanelRegionExperiences;
mInfoPanels.push_back(panel);
@ -876,7 +879,10 @@ protected:
void LLFloaterRegionInfo::requestMeshRezInfo()
{
std::string sim_console_url = gAgent.getRegion()->getCapability("SimConsoleAsync");
// <FS:Ansariel> Crash fix
//std::string sim_console_url = gAgent.getRegion()->getCapability("SimConsoleAsync");
std::string sim_console_url = gAgent.getRegion() ? gAgent.getRegion()->getCapability("SimConsoleAsync") : "";
// </FS:Ansariel>
if (!sim_console_url.empty())
{
@ -904,6 +910,13 @@ BOOL LLPanelRegionGeneralInfo::sendUpdate()
{
LL_INFOS() << "LLPanelRegionGeneralInfo::sendUpdate()" << LL_ENDL;
// <FS:Ansariel> Crash fix
if (!gAgent.getRegion())
{
return FALSE;
}
// </FS:Ansariel>
// First try using a Cap. If that fails use the old method.
LLSD body;
std::string url = gAgent.getRegion()->getCapability("DispatchRegionInfo");
@ -1052,7 +1065,7 @@ void LLPanelRegionOpenSettingsInfo::onClickOrs(void* userdata)
LL_INFOS() << "LLPanelRegionOpenSettingsInfo::onClickOrs()" << LL_ENDL;
LLSD body;
std::string url = gAgent.getRegion()->getCapability("DispatchOpenRegionSettings");
std::string url = gAgent.getRegion() ? gAgent.getRegion()->getCapability("DispatchOpenRegionSettings") : "";
if (!url.empty())
{
body["draw_distance"] = (LLSD::Integer)self->childGetValue("draw_distance");

View File

@ -393,7 +393,10 @@ LLGroupNoticeNotificationListItem::LLGroupNoticeNotificationListItem(const Param
buildFromFile("panel_notification_list_item.xml");
}
LLGroupNoticeNotificationListItem::~LLGroupNoticeNotificationListItem()
// <FS:Ansariel> Crash fix in LLGroupMgr::notifyObservers()
//LLGroupNoticeNotificationListItem::~LLGroupNoticeNotificationListItem()
LLGroupNotificationListItem::~LLGroupNotificationListItem()
// </FS:Ansariel>
{
LLGroupMgr::getInstance()->removeObserver(this);
}
@ -584,7 +587,8 @@ void LLGroupNoticeNotificationListItem::close()
mInventoryOffer->forceResponse(IOR_DECLINE);
mInventoryOffer = NULL;
}
LLGroupMgr::getInstance()->removeObserver(this);
// <FS:Ansariel> Crash fix in LLGroupMgr::notifyObservers()
//LLGroupMgr::getInstance()->removeObserver(this);
}
void LLGroupNoticeNotificationListItem::onClickAttachment()

View File

@ -140,6 +140,7 @@ class LLGroupNotificationListItem
: public LLNotificationListItem, public LLGroupMgrObserver
{
public:
virtual ~LLGroupNotificationListItem(); // <FS:Ansariel> Crash fix in LLGroupMgr::notifyObservers()
virtual BOOL postBuild();
void setGroupId(const LLUUID& value);
@ -201,7 +202,7 @@ class LLGroupNoticeNotificationListItem
: public LLGroupNotificationListItem
{
public:
~LLGroupNoticeNotificationListItem();
//~LLGroupNoticeNotificationListItem(); // <FS:Ansariel> Crash fix in LLGroupMgr::notifyObservers()
static std::set<std::string> getTypes();
virtual BOOL postBuild();

View File

@ -38,6 +38,8 @@
#include "llpanelexperiences.h"
#include "llsd.h"
#include "llvoavatarself.h"
static LLPanelInjector<LLPanelGroupExperiences> t_panel_group_experiences("panel_group_experiences");
@ -101,6 +103,13 @@ void LLPanelGroupExperiences::activate()
return;
}
// <FS:Ansariel> Crash fix
if (!isAgentAvatarValid())
{
return;
}
// </FS:Ansariel>
// search for experiences owned by the current group
std::string url = gAgent.getRegion()->getCapability("GroupExperiences");
if (!url.empty())

View File

@ -68,7 +68,7 @@
<button label="Öffnen" label_selected="Öffnen" name="open_log_path_button-panelsetup"/>
<button label="Setzen" label_selected="Setzen" name="log_path_button-panelsetup" width="45"/>
<button label="Zurücksetzen" label_selected="Zurücksetzen" name="reset_logpath" width="82"/>
<button label="Öffne Crash-Protokolle" label_selected="Öffne Crash-Protokolle" name="browse_crashlogs" width="140"/>
<button label="Öffne Viewer-Protokolle" label_selected="Öffne Viewer-Protokolle" name="browse_crashlogs" width="140"/>
<button label="Öffne Ordner mit Einstellungen" label_selected="Öffne Ordner mit Einstellungen" name="browse_settingsdir" width="190"/>
</panel>
</tab_container>

View File

@ -677,8 +677,8 @@
enabled="true"
follows="left|top"
height="23"
label="Open Crash Logs"
label_selected="Open Crash Logs"
label="Open Viewer Logs"
label_selected="Open Viewer Logs"
layout="topleft"
left="20"
name="browse_crashlogs"